From bc56c00a9a99ccbf2523ecb5f25a0e14922aed56 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 10 Jan 2008 08:24:23 -0800 Subject: Allow querying of ALC_MONO_SOURCES and ALC_STEREO_SOURCES Based on a patch by Xavier Bouchoux --- Alc/ALc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Alc') diff --git a/Alc/ALc.c b/Alc/ALc.c index 1e4bca01..d33390f7 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -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; -- cgit v1.2.3