aboutsummaryrefslogtreecommitdiffstats
path: root/al
diff options
context:
space:
mode:
Diffstat (limited to 'al')
-rw-r--r--al/source.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/al/source.cpp b/al/source.cpp
index 76f6c54b..dd79a1b6 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -2744,6 +2744,7 @@ START_API_FUNC
case AL_PAUSED:
assert(voice != nullptr);
/* A source that's paused simply resumes. */
+ cur->mOldVoice = nullptr;
cur->mVoice = voice;
cur->mSourceID = source->id;
cur->mState = AL_PLAYING;
@@ -2757,17 +2758,13 @@ START_API_FUNC
* fades back to the beginning.
*/
voice->mPendingStop.store(true, std::memory_order_relaxed);
- cur->mVoice = voice;
- cur->mSourceID = source->id;
- cur->mState = AL_STOPPED;
+ cur->mOldVoice = voice;
voice = nullptr;
-
- cur->mNext.store(GetVoiceChanger(context.get()), std::memory_order_relaxed);
- cur = cur->mNext.load(std::memory_order_relaxed);
break;
default:
assert(voice == nullptr);
+ cur->mOldVoice = nullptr;
break;
}