Make local copy of the loop characteristics

This commit is contained in:
Jean Pierre Cimalando 2020-10-06 21:06:03 +02:00
parent 24624abef1
commit 809edfa76c

View file

@ -559,6 +559,7 @@ void sfz::Voice::fillWithData(AudioSpan<float> buffer) noexcept
} }
// calculate loop characteristics // calculate loop characteristics
const auto loop = this->loop;
const bool isLooping = region->shouldLoop() const bool isLooping = region->shouldLoop()
&& (static_cast<size_t>(loop.end) < source.getNumFrames()); && (static_cast<size_t>(loop.end) < source.getNumFrames());