aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-12-09 12:14:53 -0800
committerChris Robinson <[email protected]>2009-12-09 12:14:53 -0800
commit2b7953c472f1f0a6045dd4768ad1feceffce4cb3 (patch)
tree1c53d35296d8cbadb1d1877957b1bc01ebd354e3 /Alc/ALc.c
parent368ef1cea9f2f17158ffebc70cab5c466652a176 (diff)
Track whether a context is suspended or not
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 3f4fb706..426d39f8 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -596,6 +596,7 @@ static ALvoid InitContext(ALCcontext *pContext)
//Validate pContext
pContext->LastError = AL_NO_ERROR;
pContext->InUse = AL_FALSE;
+ pContext->Suspended = AL_FALSE;
//Set globals
pContext->DistanceModel = AL_INVERSE_DISTANCE_CLAMPED;
@@ -772,8 +773,10 @@ ALCAPI ALCenum ALCAPIENTRY alcGetError(ALCdevice *device)
*/
ALCAPI ALCvoid ALCAPIENTRY alcSuspendContext(ALCcontext *pContext)
{
- // Not a lot happens here !
- (void)pContext;
+ SuspendContext(NULL);
+ if(IsContext(pContext))
+ pContext->Suspended = AL_TRUE;
+ ProcessContext(NULL);
}
@@ -784,8 +787,10 @@ ALCAPI ALCvoid ALCAPIENTRY alcSuspendContext(ALCcontext *pContext)
*/
ALCAPI ALCvoid ALCAPIENTRY alcProcessContext(ALCcontext *pContext)
{
- // Not a lot happens here !
- (void)pContext;
+ SuspendContext(NULL);
+ if(IsContext(pContext))
+ pContext->Suspended = AL_FALSE;
+ ProcessContext(NULL);
}