This cast shouldn't be necessary

This commit is contained in:
Clownacy 2020-01-29 22:15:53 +00:00
parent 638e96be11
commit d0defa4a7b

View file

@ -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; const float sample2 = (sound->samples[(size_t)sound->position + 1] - 128.0f) / 128.0f;
// Perform linear interpolation // 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_l;
*steam_pointer++ += interpolated_sample * sound->volume_r; *steam_pointer++ += interpolated_sample * sound->volume_r;