aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-01-15 15:53:06 -0800
committerChris Robinson <[email protected]>2008-01-15 15:53:06 -0800
commit7f850d8fb08547593352a997c89320ce23d07a73 (patch)
tree53f8add68c5d69cf12554cd72f7203c5b5ac2e3d /OpenAL32
parent7edc576e9ce9adc62560d9f8c87488747671ce77 (diff)
Make sure a valid context is set for effect slots
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alAuxEffectSlot.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c
index 2b77e063..ae62d8fd 100644
--- a/OpenAL32/alAuxEffectSlot.c
+++ b/OpenAL32/alAuxEffectSlot.c
@@ -40,6 +40,11 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo
ALsizei i;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return;
+ }
SuspendContext(Context);
if (n > 0)
@@ -91,6 +96,11 @@ AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effect
ALsizei i;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return;
+ }
SuspendContext(Context);
if (n >= 0)
@@ -146,6 +156,11 @@ AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot)
ALeffectslot **list;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return AL_FALSE;
+ }
SuspendContext(Context);
list = &g_AuxiliaryEffectSlotList;
@@ -162,6 +177,11 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param
ALCcontext *Context;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return;
+ }
SuspendContext(Context);
if (alIsAuxiliaryEffectSlot(effectslot))
@@ -209,6 +229,11 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum para
ALCcontext *Context;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return;
+ }
SuspendContext(Context);
if (alIsAuxiliaryEffectSlot(effectslot))
@@ -238,6 +263,11 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param
(void)flValue;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return;
+ }
SuspendContext(Context);
if (alIsAuxiliaryEffectSlot(effectslot))
@@ -269,6 +299,11 @@ AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum para
ALCcontext *Context;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return;
+ }
SuspendContext(Context);
if (alIsAuxiliaryEffectSlot(effectslot))
@@ -295,6 +330,11 @@ AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum pa
ALCcontext *Context;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return;
+ }
SuspendContext(Context);
if (alIsAuxiliaryEffectSlot(effectslot))
@@ -327,6 +367,11 @@ AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum p
ALCcontext *Context;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return;
+ }
SuspendContext(Context);
if (alIsAuxiliaryEffectSlot(effectslot))
@@ -354,6 +399,11 @@ AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum pa
ALCcontext *Context;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return;
+ }
SuspendContext(Context);
if (alIsAuxiliaryEffectSlot(effectslot))
@@ -382,6 +432,11 @@ AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum p
ALCcontext *Context;
Context = alcGetCurrentContext();
+ if(!Context)
+ {
+ alSetError(AL_INVALID_OPERATION);
+ return;
+ }
SuspendContext(Context);
if (alIsAuxiliaryEffectSlot(effectslot))