AXMakeCompressorTable

Syntax

#include <cafe/ax.h>

void AXMakeCompressorTable(f32 gain, u16 frames, u16* table);

Parameters

gain The maximum attention, in (negative) dB.
frames The release time. This is measured in audio frames and must have a value between 1 and 30,000 (inclusive).
table The location at which to write the compressor table.

Return Values

None.

Description

When the audio data in the mixing buffer overflows the range of an s16, the volume compressor applies the following envelopes:

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).

The caller must specify a buffer table having size:

    (48 × 3 × (2 × frames + 1)) × 2 bytes

The default AX compressor table is created using the following parameters:

    gain   = −4.0
    frames =  10


Availability

Library Version Availability
Sound 2.0 Yes
Sound 1.0 Yes

Do Not Call From

None.

See Also

AXSetDeviceCompressorTable
AXSetDeviceCompressor

Revision History

2013/05/08 Automated cleanup pass.
2012/01/26 Update to Audio API v2.0.
2011/02/21 Initial Version


CONFIDENTIAL