aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/alu.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-03-11 20:00:14 -0700
committerChris Robinson <[email protected]>2019-03-11 20:00:14 -0700
commit30a7c6d86fba69130b6ed64731745135f207ba35 (patch)
tree1a44e54f07f205bb62ffd850ce925af5a228a9bd /Alc/alu.cpp
parente0daad6a164e1a091c46be7ece905b32a20036bd (diff)
Pass the voice state as a parameter instead of reloading it
Diffstat (limited to 'Alc/alu.cpp')
-rw-r--r--Alc/alu.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp
index 30d2e73c..0ee0275a 100644
--- a/Alc/alu.cpp
+++ b/Alc/alu.cpp
@@ -1451,12 +1451,12 @@ void ProcessContext(ALCcontext *ctx, const ALsizei SamplesToDo)
std::for_each(ctx->Voices, ctx->Voices+ctx->VoiceCount.load(std::memory_order_acquire),
[SamplesToDo,ctx](ALvoice *voice) -> void
{
- if(voice->mPlayState.load(std::memory_order_acquire) == ALvoice::Stopped)
- return;
- ALuint sid{voice->mSourceID.load(std::memory_order_relaxed)};
+ const ALvoice::State vstate{voice->mPlayState.load(std::memory_order_acquire)};
+ if(vstate == ALvoice::Stopped) return;
+ const ALuint sid{voice->mSourceID.load(std::memory_order_relaxed)};
if(voice->mStep < 1) return;
- MixSource(voice, sid, ctx, SamplesToDo);
+ MixVoice(voice, vstate, sid, ctx, SamplesToDo);
}
);