Rémi Bernon (@rbernon) commented about dlls/dmsynth/synth.c:
!!(actual.dwEffectFlags & DMUS_EFFECT_REVERB)); fluid_settings_setint(This->fluid_settings, "synth.chorus.active", !!(actual.dwEffectFlags & DMUS_EFFECT_CHORUS));
- /* native limits the total voice gain to 6 dB */
- gain = 60.;
- /* compensate gain added in fluid_iir_filter_q_from_dB/fluid_iir_filter_set_q */
- gain -= 15.05;
- /* compensate gain added in synth_preset_noteon */
- gain -= CENTER_PAN_GAIN;
This looks a bit magical, can we do better? I don't really understand why one constant is unnamed and not the other.
I have no idea what it does, but looking at fluid_iir_filter_set_q it seems to be possible to avoid fluid_iir_filter_q_from_dB being called under some condition. Could we use that to make it generate output the way we like instead of trying to compensate its default implementation?