diff options
author | Chris Robinson <chris.kcat@gmail.com> | 2019-01-12 01:25:33 -0800 |
---|---|---|
committer | Chris Robinson <chris.kcat@gmail.com> | 2019-01-12 01:25:33 -0800 |
commit | d64eaba3229f48a519586c0436235e3c2809329b (patch) | |
tree | d578ef76627df78c0ec7b1ef2bca1fd1e8af0db1 /Alc/mixvoice.cpp | |
parent | ab1667146627e93688cfeb4cf877764f220c0c3e (diff) |
Use a flexible array for DirectHrtfState and ALvoice
Diffstat (limited to 'Alc/mixvoice.cpp')
-rw-r--r-- | Alc/mixvoice.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Alc/mixvoice.cpp b/Alc/mixvoice.cpp index 7d30ad12..b23b8d2e 100644 --- a/Alc/mixvoice.cpp +++ b/Alc/mixvoice.cpp @@ -311,12 +311,10 @@ ALboolean MixSource(ALvoice *voice, const ALuint SourceID, ALCcontext *Context, ALCdevice *Device{Context->Device}; const ALsizei IrSize{Device->mHrtf ? Device->mHrtf->irSize : 0}; - const ALsizei NumAuxSends{Device->NumAuxSends}; const int OutLIdx{GetChannelIdxByName(Device->RealOut, FrontLeft)}; const int OutRIdx{GetChannelIdxByName(Device->RealOut, FrontRight)}; ASSUME(IrSize >= 0); - ASSUME(NumAuxSends >= 0); ResamplerFunc Resample{(increment == FRACTIONONE && DataPosFrac == 0) ? Resample_copy_C : voice->Resampler}; @@ -342,7 +340,7 @@ ALboolean MixSource(ALvoice *voice, const ALuint SourceID, ALCcontext *Context, std::copy(std::begin(parms.Gains.Target), std::end(parms.Gains.Target), std::begin(parms.Gains.Current)); }; - std::for_each(voice->Send, voice->Send+NumAuxSends, set_current); + std::for_each(voice->Send.begin(), voice->Send.end(), set_current); } } else if((voice->Flags&VOICE_HAS_HRTF)) @@ -667,7 +665,7 @@ ALboolean MixSource(ALvoice *voice, const ALuint SourceID, ALCcontext *Context, MixSamples(samples, send.Channels, send.Buffer, parms.Gains.Current, parms.Gains.Target, Counter, OutPos, DstBufferSize); }; - std::for_each(voice->Send, voice->Send+NumAuxSends, mix_send); + std::for_each(voice->Send.begin(), voice->Send.end(), mix_send); } /* Update positions */ DataPosFrac += increment*DstBufferSize; |