summaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2007-12-18 15:47:24 -0800
committerChris Robinson <[email protected]>2007-12-18 15:47:24 -0800
commit9adc20e4e727bb2a9829cf9c9a970358d094b951 (patch)
tree993de47a9a08ec5c777c72a77c1d47c1f975747f /OpenAL32/alAuxEffectSlot.c
parentbdf16bf601ed1cedc652af62029d4cbd91e90c09 (diff)
Implement AL_EFFECTSLOT_GAIN property
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r--OpenAL32/alAuxEffectSlot.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 8e76984f..564314bd 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -229,8 +229,17 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param
if (alIsAuxiliaryEffectSlot(effectslot))
{
+ ALeffectslot *ALEffectSlot = (ALeffectslot*)ALTHUNK_LOOKUPENTRY(effectslot);
+
switch(param)
{
+ case AL_EFFECTSLOT_GAIN:
+ if(flValue >= 0.0f && flValue <= 1.0f)
+ ALEffectSlot->Gain = flValue;
+ else
+ alSetError(AL_INVALID_VALUE);
+ break;
+
default:
alSetError(AL_INVALID_ENUM);
break;
@@ -246,8 +255,6 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum para
{
ALCcontext *Context;
- (void)pflValues;
-
Context = alcGetCurrentContext();
SuspendContext(Context);
@@ -255,6 +262,10 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum para
{
switch(param)
{
+ case AL_EFFECTSLOT_GAIN:
+ alAuxiliaryEffectSlotf(effectslot, param, pflValues[0]);
+ break;
+
default:
alSetError(AL_INVALID_ENUM);
break;
@@ -324,15 +335,19 @@ AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum pa
{
ALCcontext *Context;
- (void)pflValue;
-
Context = alcGetCurrentContext();
SuspendContext(Context);
if (alIsAuxiliaryEffectSlot(effectslot))
{
+ ALeffectslot *ALEffectSlot = (ALeffectslot*)ALTHUNK_LOOKUPENTRY(effectslot);
+
switch(param)
{
+ case AL_EFFECTSLOT_GAIN:
+ *pflValue = ALEffectSlot->Gain;
+ break;
+
default:
alSetError(AL_INVALID_ENUM);
break;
@@ -348,8 +363,6 @@ AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum p
{
ALCcontext *Context;
- (void)pflValues;
-
Context = alcGetCurrentContext();
SuspendContext(Context);
@@ -357,6 +370,10 @@ AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum p
{
switch(param)
{
+ case AL_EFFECTSLOT_GAIN:
+ alGetAuxiliaryEffectSlotf(effectslot, param, pflValues);
+ break;
+
default:
alSetError(AL_INVALID_ENUM);
break;