This cast shouldn't be necessary
This commit is contained in:
parent
638e96be11
commit
d0defa4a7b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue