diff options
author | Chris Robinson <[email protected]> | 2011-03-12 21:28:40 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-03-12 21:28:40 -0800 |
commit | 89c253ce41b9eddd86aaecb31ce5d9ed3f1eb5e8 (patch) | |
tree | acdb0c85f02b0e6bb48647b92b7b9b60a67495af /utils/openal-info.c | |
parent | b1d4508d90eeb245bfc0f720fa9c0da7df8444fa (diff) |
Recognize ALC_EXT_DEDICATED with openal-info
Diffstat (limited to 'utils/openal-info.c')
-rw-r--r-- | utils/openal-info.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/utils/openal-info.c b/utils/openal-info.c index 586a1c73..7735b800 100644 --- a/utils/openal-info.c +++ b/utils/openal-info.c @@ -74,6 +74,11 @@ static LPALGENEFFECTS palGenEffects; static LPALDELETEEFFECTS palDeleteEffects; static LPALEFFECTI palEffecti; +#ifndef ALC_EXT_DEDICATED +#define AL_EFFECT_DEDICATED_DIALOGUE 0x9001 +#define AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT 0x9000 +#endif + #define MAX_WIDTH 80 @@ -198,9 +203,14 @@ static void printEFXInfo(ALCdevice *device) AL_EFFECT_PITCH_SHIFTER, AL_EFFECT_RING_MODULATOR, AL_EFFECT_AUTOWAH, AL_EFFECT_COMPRESSOR, AL_EFFECT_EQUALIZER, AL_EFFECT_NULL }; + const ALenum dedeffects[] = { + AL_EFFECT_DEDICATED_DIALOGUE, + AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT, AL_EFFECT_NULL + }; char effectNames[] = "EAX Reverb,Reverb,Chorus,Distortion,Echo,Flanger," "Frequency Shifter,Vocal Morpher,Pitch Shifter," - "Ring Modulator,Autowah,Compressor,Equalizer,"; + "Ring Modulator,Autowah,Compressor,Equalizer," + "Dedicated Dialog,Dedicated LFE,"; char *current; if(alcIsExtensionPresent(device, "ALC_EXT_EFX") == AL_FALSE) @@ -266,6 +276,27 @@ static void printEFXInfo(ALCdevice *device) else memmove(current, next+1, strlen(next)); } + if(alcIsExtensionPresent(device, "ALC_EXT_DEDICATED")) + { + for(i = 0;dedeffects[i] != AL_EFFECT_NULL;i++) + { + char *next = strchr(current, ','); + + palEffecti(obj, AL_EFFECT_TYPE, dedeffects[i]); + if(alGetError() == AL_NO_ERROR) + current = next+1; + else + memmove(current, next+1, strlen(next)); + } + } + else + { + for(i = 0;dedeffects[i] != AL_EFFECT_NULL;i++) + { + char *next = strchr(current, ','); + memmove(current, next+1, strlen(next)); + } + } palDeleteEffects(1, &obj); checkALErrors(); |