diff options
author | Chris Robinson <[email protected]> | 2008-01-10 08:24:23 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-01-10 08:24:23 -0800 |
commit | bc56c00a9a99ccbf2523ecb5f25a0e14922aed56 (patch) | |
tree | 1e4bdacf60dbb749e9958bc9417c50e6000e6744 /Alc/ALc.c | |
parent | 1e3ad2f9ce9dcb95c76ab1e16a317d50657bba09 (diff) |
Allow querying of ALC_MONO_SOURCES and ALC_STEREO_SOURCES
Based on a patch by Xavier Bouchoux
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -754,6 +754,24 @@ ALCAPI ALCvoid ALCAPIENTRY alcGetIntegerv(ALCdevice *device,ALCenum param,ALsize *data = ALC_FALSE; break; + case ALC_MONO_SOURCES: + if(!device || !device->Context) + SetALCError(ALC_INVALID_DEVICE); + else if (size != 1) + SetALCError(ALC_INVALID_VALUE); + else + *data = device->Context->lNumMonoSources; + break; + + case ALC_STEREO_SOURCES: + if(!device || !device->Context) + SetALCError(ALC_INVALID_DEVICE); + else if (size != 1) + SetALCError(ALC_INVALID_VALUE); + else + *data = device->Context->lNumStereoSources; + break; + default: SetALCError(ALC_INVALID_ENUM); break; |