#include <revolution/ax.h> void AXMakeCompressorTable(f32 gain, u16 frames, u16* table);
| gain | The maximum attenuation. This is a negative decibel value. |
|---|---|
| frames | The release time. This is measured in audio frames (3 ms) and has a value between 1 and 30,000 (inclusive). |
| table | The location to output the compressor table. |
None.
When the audio data in the mixing buffer exceeds the range of s16, the audio DSP compressor applies the following envelopes to it:
| Attack Time | One audio frame (fixed value). |
|---|---|
| Attack Gain | The gain value specified as an argument. |
| Decay | None. |
| Sustain | The duration during which the data exceeds the s16 range (in frames). |
| Release Time | The frames value specified as an argument. |
This function creates a table of the above envelopes (a compressor table) structured in a way that is easy for audio DSPs to handle.
Specify a preallocated region of the following size for table, the output location of the compressor table.
(32 × 3 × (2 × frames + 1)) × 2 bytes
(Reference) The default AX compressor table is created based on the following numbers.
gain = -4.0
frames = 10
2008/02/26 Initial version.
CONFIDENTIAL