Use typeInfo<float> for float equality comparison

Co-authored-by: Dalton Messmer <33463986+messmerd@users.noreply.github.com>
This commit is contained in:
saker
2023-09-26 07:38:53 -04:00
committed by GitHub
parent 44c5bb5681
commit ee19205d77

View File

@@ -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<sampleFrame>(numFrames / resampleRatio);
if (resampleRatio != 1.0f)
if (!typeInfo<float>::isEqual(resampleRatio, 1.0f))
{
playBuffer.resize(playBuffer.size() + s_interpolationMargins[state->m_interpolationMode]);
}