diff options
author | Chris Robinson <[email protected]> | 2016-08-26 19:46:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2016-08-26 21:19:38 -0700 |
commit | 4b153dade82b0558c96d54828bd2f9f86dc808fd (patch) | |
tree | f8bdb9f899633d8850c614232808392a7430ea58 /Alc/ALc.c | |
parent | ef03de39814486a1d91949cfff8b6a33bd137f91 (diff) |
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.
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); } } |