diff options
author | Chris Robinson <[email protected]> | 2020-12-16 01:18:11 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-16 01:40:15 -0800 |
commit | c96b50fb657f6760636becab70dbbdaa1bfb2974 (patch) | |
tree | 81fa749a7a1fbc8333531ebf08a7fe01807abfc4 /al/source.cpp | |
parent | 5ad28f8cbaa52f3f6bf4c4cdbfbdbeb3087020e1 (diff) |
Use a separate enum for the VoiceChange state
Diffstat (limited to 'al/source.cpp')
-rw-r--r-- | al/source.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/al/source.cpp b/al/source.cpp index 22edc8a7..6bdfa01a 100644 --- a/al/source.cpp +++ b/al/source.cpp @@ -619,7 +619,7 @@ bool SetVoiceOffset(Voice *oldvoice, const VoicePos &vpos, ALsource *source, ALC vchg->mOldVoice = oldvoice; vchg->mVoice = newvoice; vchg->mSourceID = source->id; - vchg->mState = AL_SAMPLE_OFFSET; + vchg->mState = VChangeState::Restart; SendVoiceChanges(context, vchg); /* If the old voice still has a sourceID, it's still active and the change- @@ -740,7 +740,7 @@ void FreeSource(ALCcontext *context, ALsource *source) voice->mPendingChange.store(true, std::memory_order_relaxed); vchg->mVoice = voice; vchg->mSourceID = source->id; - vchg->mState = AL_STOPPED; + vchg->mState = VChangeState::Stop; SendVoiceChanges(context, vchg); } @@ -2935,7 +2935,7 @@ START_API_FUNC if(!voice) break; cur->mVoice = voice; cur->mSourceID = source->id; - cur->mState = AL_PLAYING; + cur->mState = VChangeState::Play; source->state = AL_PLAYING; continue; @@ -2997,7 +2997,7 @@ START_API_FUNC cur->mVoice = voice; cur->mSourceID = source->id; - cur->mState = AL_PLAYING; + cur->mState = VChangeState::Play; } if LIKELY(tail) SendVoiceChanges(context.get(), tail); @@ -3059,7 +3059,7 @@ START_API_FUNC } cur->mVoice = voice; cur->mSourceID = source->id; - cur->mState = AL_PAUSED; + cur->mState = VChangeState::Pause; } } if LIKELY(tail) @@ -3131,7 +3131,7 @@ START_API_FUNC voice->mPendingChange.store(true, std::memory_order_relaxed); cur->mVoice = voice; cur->mSourceID = source->id; - cur->mState = AL_STOPPED; + cur->mState = VChangeState::Stop; source->state = AL_STOPPED; } source->Offset = 0.0; @@ -3196,7 +3196,7 @@ START_API_FUNC voice->mPendingChange.store(true, std::memory_order_relaxed); cur->mVoice = voice; cur->mSourceID = source->id; - cur->mState = AL_INITIAL; + cur->mState = VChangeState::Reset; source->state = AL_INITIAL; } source->Offset = 0.0; |