diff --git a/src/common/audio/sound/oalsound.cpp b/src/common/audio/sound/oalsound.cpp index d97c9d5a6..acbf19740 100644 --- a/src/common/audio/sound/oalsound.cpp +++ b/src/common/audio/sound/oalsound.cpp @@ -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); diff --git a/src/common/audio/sound/oalsound.h b/src/common/audio/sound/oalsound.h index a333d772d..13fa3e588 100644 --- a/src/common/audio/sound/oalsound.h +++ b/src/common/audio/sound/oalsound.h @@ -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;