aboutsummaryrefslogtreecommitdiffstats
path: root/al/source.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-02-08 11:00:12 -0800
committerChris Robinson <[email protected]>2022-02-08 11:00:12 -0800
commit6fb908bc38a0bfba1e21562495843b5d1f2468b5 (patch)
treed1f55d235dc1cc2c86db31dff31683e381e7a824 /al/source.cpp
parentb2e0c3e002f346133695c81023d2e4ed145c9e0d (diff)
Commit deferred EAX settings earlier when playing
Before the property update is supplied to the voice in InitVoice.
Diffstat (limited to 'al/source.cpp')
-rw-r--r--al/source.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/al/source.cpp b/al/source.cpp
index cbe5de2d..dccdc7f0 100644
--- a/al/source.cpp
+++ b/al/source.cpp
@@ -3124,10 +3124,8 @@ START_API_FUNC
cur->mNext.store(GetVoiceChanger(context.get()), std::memory_order_relaxed);
cur = cur->mNext.load(std::memory_order_relaxed);
}
+
Voice *voice{GetSourceVoice(source, context.get())};
-#ifdef ALSOFT_EAX
- auto eax_is_begins_to_play = false;
-#endif // ALSOFT_EAX
switch(GetSourceState(source, voice))
{
case AL_PAUSED:
@@ -3141,7 +3139,7 @@ START_API_FUNC
cur->mState = VChangeState::Play;
source->state = AL_PLAYING;
#ifdef ALSOFT_EAX
- eax_is_begins_to_play = true;
+ source->eax_commit();
#endif // ALSOFT_EAX
continue;
@@ -3160,7 +3158,7 @@ START_API_FUNC
assert(voice == nullptr);
cur->mOldVoice = nullptr;
#ifdef ALSOFT_EAX
- eax_is_begins_to_play = true;
+ source->eax_commit();
#endif // ALSOFT_EAX
break;
}
@@ -3208,11 +3206,6 @@ START_API_FUNC
cur->mVoice = voice;
cur->mSourceID = source->id;
cur->mState = VChangeState::Play;
-
-#ifdef ALSOFT_EAX
- if (eax_is_begins_to_play)
- source->eax_commit();
-#endif // ALSOFT_EAX
}
if LIKELY(tail)
SendVoiceChanges(context.get(), tail);