Change double to float

A quick test with godbolt shows this produces smaller (and presumably
faster) code.
This commit is contained in:
Clownacy 2020-04-06 13:48:44 +01:00
parent 545948584a
commit ba9ccec945

View file

@ -151,7 +151,7 @@ ATTRIBUTE_HOT void Mixer_MixSounds(float *stream, unsigned int frames_total)
for (unsigned int frames_done = 0; frames_done < frames_total; ++frames_done)
{
const size_t position_integral = (size_t)sound->position;
const double position_fractional = sound->position - position_integral;
const float position_fractional = sound->position - position_integral;
// Get two samples, and normalise them to 0-1
const float sample1 = (sound->samples[position_integral] - 128.0f) / 128.0f;