mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2024-12-01 00:21:14 +00:00
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:
parent
1629f9f997
commit
29d194ed6d
1 changed files with 1 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue