From 4b153dade82b0558c96d54828bd2f9f86dc808fd Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 26 Aug 2016 19:46:46 -0700 Subject: Allow sources to play while alcSuspendContext is in effect This appears to be how Creative's Windows drivers handle it, and is necessary for at least the Windows version of UT2k4 (otherwise it tries to play a source while suspended, checks and sees it's stopped, then kills it before it's given a chance to start playing). Consequently, the internal properties it gets mixed with are determined by what the source properties are at the time of the play call, and the listener properties at the time of the suspend call. This does not change alDeferUpdatesSOFT, which will still hold the play state change until alProcessUpdatesSOFT. --- Alc/ALc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc/ALc.c') diff --git a/Alc/ALc.c b/Alc/ALc.c index b95c90f8..26cdc771 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -1584,9 +1584,9 @@ extern inline ALint GetChannelIndex(const enum Channel names[MAX_OUTPUT_CHANNELS * does *NOT* stop mixing, but rather prevents certain property changes from * taking effect. */ -void ALCcontext_DeferUpdates(ALCcontext *context) +void ALCcontext_DeferUpdates(ALCcontext *context, ALenum type) { - ATOMIC_STORE(&context->DeferUpdates, AL_TRUE); + ATOMIC_STORE(&context->DeferUpdates, type); } /* ALCcontext_ProcessUpdates @@ -2545,7 +2545,7 @@ ALC_API ALCvoid ALC_APIENTRY alcSuspendContext(ALCcontext *context) alcSetError(NULL, ALC_INVALID_CONTEXT); else { - ALCcontext_DeferUpdates(context); + ALCcontext_DeferUpdates(context, DeferAllowPlay); ALCcontext_DecRef(context); } } -- cgit v1.2.3