Revert "adjust voice gain for 24bit samples"

This reverts commit 1629f9f997. Accidentally committed to wrong master branch instead of sm24.
This commit is contained in:
derselbst 2017-12-09 16:48:57 +01:00
parent 1629f9f997
commit 29d194ed6d

View file

@ -438,11 +438,7 @@ void fluid_voice_start(fluid_voice_t* voice)
*/ */
static fluid_real_t fluid_voice_calculate_gain_amplitude(const fluid_voice_t* voice, fluid_real_t gain) static fluid_real_t fluid_voice_calculate_gain_amplitude(const fluid_voice_t* voice, fluid_real_t gain)
{ {
/* we use 24bit samples in fluid_rvoice_dsp. in order to normalize float return gain * voice->synth_gain / 32768.0f;
* samples to [0.0;1.0] divide samples by the max. value of an int24 and
* amplify them with the gain */
const fluid_real_t INT24_MAX = (1 << (16+8-1)) * 1.0f;
return gain * voice->synth_gain / INT24_MAX;
} }
void void