diff options
author | Chris Robinson <[email protected]> | 2021-06-14 16:56:46 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2021-06-14 16:56:46 -0700 |
commit | 302b6f3cede2ef60c7df424bef64a7be2c6f2afe (patch) | |
tree | c0e3f352bbe94cdf1393b81c4e4e6b471ef2486c /core/voice.cpp | |
parent | 2f16fc190f2d71d7a5a3557fa61bb7a47f8fd701 (diff) |
Avoid altering SrcBufferSize in each channel
Diffstat (limited to 'core/voice.cpp')
-rw-r--r-- | core/voice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/voice.cpp b/core/voice.cpp index e580ef05..b68069fa 100644 --- a/core/voice.cpp +++ b/core/voice.cpp @@ -559,6 +559,7 @@ void Voice::mix(const State vstate, ContextBase *Context, const uint SamplesToDo if UNLIKELY(!BufferListItem) { + SrcBufferSize = SrcBufferSize - PostPadding + MaxResamplerPadding; for(auto &chanbuffer : mVoiceSamples) { auto srciter = chanbuffer.data() + MaxResamplerEdge; @@ -572,7 +573,6 @@ void Voice::mix(const State vstate, ContextBase *Context, const uint SamplesToDo { return std::abs(lhs) < std::abs(rhs); }; srciter = std::min_element(srciter, srcend, abs_lt); - SrcBufferSize = SrcBufferSize - PostPadding + MaxResamplerPadding; std::fill(srciter+1, chanbuffer.data() + SrcBufferSize, *srciter); } } |