diff --git a/src/core/Sample.cpp b/src/core/Sample.cpp index 2972bc397..9d25d28d6 100644 --- a/src/core/Sample.cpp +++ b/src/core/Sample.cpp @@ -124,7 +124,7 @@ bool Sample::play(sampleFrame* dst, PlaybackState* state, int numFrames, float d // If there happens to be an upper limit on the frames per period, we could use ArrayVector here instead auto playBuffer = std::vector(numFrames / resampleRatio); - if (resampleRatio != 1.0f) + if (!typeInfo::isEqual(resampleRatio, 1.0f)) { playBuffer.resize(playBuffer.size() + s_interpolationMargins[state->m_interpolationMode]); }