1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<title>AXMakeCompressorTable</title>
6<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
7<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
8<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows">
9<META http-equiv="Content-Style-Type" content="text/css">
10</head>
11
12<body>
13
14<h1 align="left">AXMakeCompressorTable</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/ax.h&gt;
19
20void AXMakeCompressorTable(f32 gain, u16 frames, u16* table);
21</pre></dd></dl>
22
23<h2>Arguments</h2>
24
25<table class="arguments" border="1" >
26  <tr>
27<th>gain</th>
28<td>The maximum attenuation. This is a negative decibel value.</td>
29  </tr>
30  <tr>
31<th>frames</th>
32<td>The release time. This is measured in audio frames (3 ms) and has a value between 1 and 30,000 (inclusive).</td>
33  </tr>
34  <tr>
35<th>table</th>
36<td>The location to output the compressor table.</td>
37  </tr>
38</table>
39
40<h2>Return Values</h2>
41
42<p>None.</p>
43
44<h2>Description</h2>
45
46<p>When the audio data in the mixing buffer exceeds the range of <code>s16</code>, the audio DSP compressor applies the following envelopes to it:</p>
47
48<table border="1">
49  <tbody>
50    <tr>
51<th>Attack Time</th>
52<td>One audio frame (fixed value).</td>
53    </tr>
54    <tr>
55<th>Attack Gain</th>
56<td>The <SPAN class="argument">gain</SPAN> value specified as an argument.</td>
57    </tr>
58    <tr>
59<th>Decay</th>
60<td>None.</td>
61    </tr>
62    <tr>
63<th>Sustain</th>
64<td>The duration during which the data exceeds the <code>s16</code> range (in frames).</td>
65    </tr>
66    <tr>
67<th>Release Time</th>
68<td>The <SPAN class="argument">frames</SPAN> value specified as an argument.</td>
69    </tr>
70  </tbody>
71</table>
72
73<p>This function creates a table of the above envelopes (a compressor table) structured in a way that is easy for audio DSPs to handle.</p>
74
75<p>Specify a preallocated region of the following size for <SPAN class="argument">table</SPAN>, the output location of the compressor table.</p>
76
77<BLOCKQUOTE>
78(32 &times; 3 &times; (2 &times; <SPAN class="argument">frames</SPAN> + 1)) &times; 2 bytes
79</BLOCKQUOTE>
80
81<p><strong>(Reference)</strong> The default AX compressor table is created based on the following numbers.</p>
82
83<BLOCKQUOTE>
84<SPAN class="argument">gain</SPAN> = -4.0<br> <SPAN class="argument">frames</SPAN> = 10
85</BLOCKQUOTE>
86
87<h2>See Also</h2>
88
89<p class="reference">
90<a href="../Initialization/AXSetCompressorTable.html">AXSetCompressorTable</a>
91</p>
92
93<H2>Revision History</H2>
94
95<p>
962008/02/26 Initial version.
97</p>
98
99<hr><p>CONFIDENTIAL</p></body>
100</html>
101