Fix weird buzzing in the software mixer
Not really sure why this causes it, but apparently it does.
This commit is contained in:
parent
0aa65f7cd3
commit
bcd883e767
1 changed files with 1 additions and 1 deletions
|
@ -159,7 +159,7 @@ ATTR_HOT void Mixer_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) * fmod((float)sound->position, 1.0f));
|
||||
const float interpolated_sample = sample1 + ((sample2 - sample1) * fmod(sound->position, 1.0));
|
||||
|
||||
*steam_pointer++ += interpolated_sample * sound->volume_l;
|
||||
*steam_pointer++ += interpolated_sample * sound->volume_r;
|
||||
|
|
Loading…
Add table
Reference in a new issue