From d0defa4a7b5cdf500e20ee5abf34d13593cfd74a Mon Sep 17 00:00:00 2001 From: Clownacy Date: Wed, 29 Jan 2020 22:15:53 +0000 Subject: [PATCH] This cast shouldn't be necessary --- src/Backends/Audio/SDL2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Backends/Audio/SDL2.cpp b/src/Backends/Audio/SDL2.cpp index 6b73cdae..056c8f93 100644 --- a/src/Backends/Audio/SDL2.cpp +++ b/src/Backends/Audio/SDL2.cpp @@ -91,7 +91,7 @@ ATTR_HOT static void MixSounds(float *stream, unsigned int frames_total) const float sample2 = (sound->samples[(size_t)sound->position + 1] - 128.0f) / 128.0f; // Perform linear interpolation - const float interpolated_sample = sample1 + ((sample2 - sample1) * (float)fmod((float)sound->position, 1.0f)); + const float interpolated_sample = sample1 + ((sample2 - sample1) * fmod((float)sound->position, 1.0f)); *steam_pointer++ += interpolated_sample * sound->volume_l; *steam_pointer++ += interpolated_sample * sound->volume_r;