Allow building alffplay without experimental extensions
[openal-soft.git] / Alc / mastering.h
blobb68b0de174eabd65a3371090fe76ef422d59b92e
1 #ifndef MASTERING_H
2 #define MASTERING_H
4 #include "AL/al.h"
6 /* For BUFFERSIZE. */
7 #include "alMain.h"
9 struct Compressor;
11 /* The compressor is initialized with the following settings:
13 * NumChans - Number of channels to process.
14 * SampleRate - Sample rate to process.
15 * AutoKnee - Whether to automate the knee width parameter.
16 * AutoAttack - Whether to automate the attack time parameter.
17 * AutoRelease - Whether to automate the release time parameter.
18 * AutoPostGain - Whether to automate the make-up (post) gain parameter.
19 * AutoDeclip - Whether to automate clipping reduction. Ignored when
20 * not automating make-up gain.
21 * LookAheadTime - Look-ahead time (in seconds).
22 * HoldTime - Peak hold-time (in seconds).
23 * PreGainDb - Gain applied before detection (in dB).
24 * PostGainDb - Make-up gain applied after compression (in dB).
25 * ThresholdDb - Triggering threshold (in dB).
26 * Ratio - Compression ratio (x:1). Set to INFINIFTY for true
27 * limiting. Ignored when automating knee width.
28 * KneeDb - Knee width (in dB). Ignored when automating knee
29 * width.
30 * AttackTimeMin - Attack time (in seconds). Acts as a maximum when
31 * automating attack time.
32 * ReleaseTimeMin - Release time (in seconds). Acts as a maximum when
33 * automating release time.
35 struct Compressor* CompressorInit(const ALsizei NumChans, const ALuint SampleRate,
36 const ALboolean AutoKnee, const ALboolean AutoAttack,
37 const ALboolean AutoRelease, const ALboolean AutoPostGain,
38 const ALboolean AutoDeclip, const ALfloat LookAheadTime,
39 const ALfloat HoldTime, const ALfloat PreGainDb,
40 const ALfloat PostGainDb, const ALfloat ThresholdDb,
41 const ALfloat Ratio, const ALfloat KneeDb,
42 const ALfloat AttackTime, const ALfloat ReleaseTime);
44 void ApplyCompression(struct Compressor *Comp, const ALsizei SamplesToDo,
45 ALfloat (*restrict OutBuffer)[BUFFERSIZE]);
47 ALsizei GetCompressorLookAhead(const struct Compressor *Comp);
49 #endif /* MASTERING_H */