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