mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-19 07:00:52 +00:00
- enable OpenAL's sound volume normalizer.
This commit is contained in:
parent
0b7fb453ab
commit
fb0a40e0f0
2 changed files with 10 additions and 0 deletions
|
@ -556,6 +556,8 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
|||
ALC.EXT_disconnect = !!alcIsExtensionPresent(Device, "ALC_EXT_disconnect");
|
||||
ALC.SOFT_HRTF = !!alcIsExtensionPresent(Device, "ALC_SOFT_HRTF");
|
||||
ALC.SOFT_pause_device = !!alcIsExtensionPresent(Device, "ALC_SOFT_pause_device");
|
||||
ALC.SOFT_pause_device = !!alcIsExtensionPresent(Device, "ALC_SOFT_pause_device");
|
||||
ALC.SOFT_output_limiter = !!alcIsExtensionPresent(Device, "ALC_SOFT_output_limiter");
|
||||
|
||||
const ALCchar *current = NULL;
|
||||
if(alcIsExtensionPresent(Device, "ALC_ENUMERATE_ALL_EXT"))
|
||||
|
@ -592,6 +594,11 @@ OpenALSoundRenderer::OpenALSoundRenderer()
|
|||
else
|
||||
attribs.Push(ALC_DONT_CARE_SOFT);
|
||||
}
|
||||
if (ALC.SOFT_output_limiter)
|
||||
{
|
||||
attribs.Push(ALC_OUTPUT_LIMITER_SOFT);
|
||||
attribs.Push(ALC_TRUE /* or ALC_FALSE or ALC_DONT_CARE_SOFT */);
|
||||
}
|
||||
// Other attribs..?
|
||||
attribs.Push(0);
|
||||
|
||||
|
|
|
@ -48,6 +48,8 @@
|
|||
#define ALC_NUM_HRTF_SPECIFIERS_SOFT 0x1994
|
||||
#define ALC_HRTF_SPECIFIER_SOFT 0x1995
|
||||
#define ALC_HRTF_ID_SOFT 0x1996
|
||||
#define ALC_OUTPUT_LIMITER_SOFT 0x199A
|
||||
|
||||
typedef const ALCchar* (ALC_APIENTRY*LPALCGETSTRINGISOFT)(ALCdevice *device, ALCenum paramName, ALCsizei index);
|
||||
typedef ALCboolean (ALC_APIENTRY*LPALCRESETDEVICESOFT)(ALCdevice *device, const ALCint *attribs);
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
|
@ -181,6 +183,7 @@ private:
|
|||
bool EXT_disconnect;
|
||||
bool SOFT_HRTF;
|
||||
bool SOFT_pause_device;
|
||||
bool SOFT_output_limiter;
|
||||
} ALC;
|
||||
struct {
|
||||
bool EXT_source_distance_model;
|
||||
|
|
Loading…
Reference in a new issue