From a35b9bbd3eac75771ca90d5755068cf88d5406aa Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 9 Jun 2017 13:32:34 -0700 Subject: Don't force a fade-in when resuming a paused source This needs to be handled more automatically by the mixer to work correctly. Otherwise, requiring a property update on resume can put the source into a playing state with the mixer never playing it, due to not having valid mixing parameters and the mixing parameters not getting calculated because no updates are specified by the app (and forcing an update can break deferred updates). --- OpenAL32/alSource.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index 46f23a75..be191fdb 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -2502,17 +2502,7 @@ AL_API ALvoid AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources) case AL_PAUSED: assert(voice != NULL); - /* A source that's paused simply resumes. Clear its mixing - * parameters and mark it as 'fading' so it fades in from - * silence. - */ - voice->Step = 0; - voice->Flags |= VOICE_IS_FADING; - memset(voice->Direct.Params, 0, sizeof(voice->Direct.Params[0])* - voice->NumChannels); - for(s = 0;s < device->NumAuxSends;s++) - memset(voice->Send[s].Params, 0, sizeof(voice->Send[s].Params[0])* - voice->NumChannels); + /* A source that's paused simply resumes. */ ATOMIC_STORE(&voice->Playing, true, almemory_order_release); ATOMIC_STORE(&source->state, AL_PLAYING, almemory_order_release); goto finish_play; -- cgit v1.2.3