diff options
author | Chris Robinson <[email protected]> | 2020-03-28 17:20:38 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-03-28 18:15:05 -0700 |
commit | 963d9b761b53c270fc8b7e91e32b2fe7b79b51be (patch) | |
tree | 94f1c70ce6af21c5703942bde09c1d62a67af36e /alc/voice.cpp | |
parent | fb076125454efb92fb8c9684dadf0f338d70aa32 (diff) |
Rename ALvoice and related structs to Voice
Diffstat (limited to 'alc/voice.cpp')
-rw-r--r-- | alc/voice.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/alc/voice.cpp b/alc/voice.cpp index d09aa700..64e0bde4 100644 --- a/alc/voice.cpp +++ b/alc/voice.cpp @@ -573,7 +573,7 @@ void DoNfcMix(const al::span<const float> samples, FloatBufferLine *OutBuffer, D } // namespace -void ALvoice::mix(const State vstate, ALCcontext *Context, const ALuint SamplesToDo) +void Voice::mix(const State vstate, ALCcontext *Context, const ALuint SamplesToDo) { static constexpr std::array<float,MAX_OUTPUT_CHANNELS> SilentTarget{}; @@ -591,8 +591,8 @@ void ALvoice::mix(const State vstate, ALCcontext *Context, const ALuint SamplesT /* If the voice is supposed to be stopping but can't be mixed, just * stop it before bailing. */ - if(vstate == ALvoice::Stopping) - mPlayState.store(ALvoice::Stopped, std::memory_order_release); + if(vstate == Stopping) + mPlayState.store(Stopped, std::memory_order_release); return; } @@ -776,22 +776,22 @@ void ALvoice::mix(const State vstate, ALCcontext *Context, const ALuint SamplesT if((mFlags&VOICE_HAS_HRTF)) { - const ALfloat TargetGain{UNLIKELY(vstate == ALvoice::Stopping) ? 0.0f : + const ALfloat TargetGain{UNLIKELY(vstate == Stopping) ? 0.0f : parms.Hrtf.Target.Gain}; DoHrtfMix(samples, DstBufferSize, parms, TargetGain, Counter, OutPos, IrSize, Device); } else if((mFlags&VOICE_HAS_NFC)) { - const float *TargetGains{UNLIKELY(vstate == ALvoice::Stopping) ? - SilentTarget.data() : parms.Gains.Target.data()}; + const float *TargetGains{UNLIKELY(vstate == Stopping) ? SilentTarget.data() + : parms.Gains.Target.data()}; DoNfcMix({samples, DstBufferSize}, mDirect.Buffer.data(), parms, TargetGains, Counter, OutPos, Device); } else { - const float *TargetGains{UNLIKELY(vstate == ALvoice::Stopping) ? - SilentTarget.data() : parms.Gains.Target.data()}; + const float *TargetGains{UNLIKELY(vstate == Stopping) ? SilentTarget.data() + : parms.Gains.Target.data()}; MixSamples({samples, DstBufferSize}, mDirect.Buffer, parms.Gains.Current.data(), TargetGains, Counter, OutPos); } @@ -806,8 +806,8 @@ void ALvoice::mix(const State vstate, ALCcontext *Context, const ALuint SamplesT const ALfloat *samples{DoFilters(&parms.LowPass, &parms.HighPass, FilterBuf, {ResampledData, DstBufferSize}, mSend[send].FilterType)}; - const float *TargetGains{UNLIKELY(vstate == ALvoice::Stopping) ? - SilentTarget.data() : parms.Gains.Target.data()}; + const float *TargetGains{UNLIKELY(vstate == Stopping) ? SilentTarget.data() + : parms.Gains.Target.data()}; MixSamples({samples, DstBufferSize}, mSend[send].Buffer, parms.Gains.Current.data(), TargetGains, Counter, OutPos); } @@ -885,9 +885,9 @@ void ALvoice::mix(const State vstate, ALCcontext *Context, const ALuint SamplesT mFlags |= VOICE_IS_FADING; /* Don't update positions and buffers if we were stopping. */ - if UNLIKELY(vstate == ALvoice::Stopping) + if UNLIKELY(vstate == Stopping) { - mPlayState.store(ALvoice::Stopped, std::memory_order_release); + mPlayState.store(Stopped, std::memory_order_release); return; } @@ -925,7 +925,7 @@ void ALvoice::mix(const State vstate, ALCcontext *Context, const ALuint SamplesT /* If the voice just ended, set it to Stopping so the next render * ensures any residual noise fades to 0 amplitude. */ - mPlayState.store(ALvoice::Stopping, std::memory_order_release); + mPlayState.store(Stopping, std::memory_order_release); if((enabledevt&EventType_SourceStateChange)) SendSourceStoppedEvent(Context, SourceID); } |