From ee19205d773c33859f2208ecd2ed431e9f78c4f1 Mon Sep 17 00:00:00 2001 From: saker Date: Tue, 26 Sep 2023 07:38:53 -0400 Subject: [PATCH] Use typeInfo for float equality comparison Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com> --- src/core/Sample.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]); }