mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-22 15:42:54 +00:00
Do not use loop noise floor if sample continues in release phase (ticket #93)
Reported by Graham Goode.
This commit is contained in:
parent
abc4ffc5f4
commit
cabb6ad315
1 changed files with 2 additions and 2 deletions
|
@ -195,8 +195,8 @@ fluid_rvoice_check_sample_sanity(fluid_rvoice_t* voice)
|
|||
/* Is the voice loop within the sample loop? */
|
||||
if ((int)voice->dsp.loopstart >= (int)voice->dsp.sample->loopstart
|
||||
&& (int)voice->dsp.loopend <= (int)voice->dsp.sample->loopend){
|
||||
/* Is there a valid peak amplitude available for the loop? */
|
||||
if (voice->dsp.sample->amplitude_that_reaches_noise_floor_is_valid){
|
||||
/* Is there a valid peak amplitude available for the loop, and can we use it? */
|
||||
if (voice->dsp.sample->amplitude_that_reaches_noise_floor_is_valid && voice->dsp.samplemode == FLUID_LOOP_DURING_RELEASE){
|
||||
voice->dsp.amplitude_that_reaches_noise_floor_loop=voice->dsp.sample->amplitude_that_reaches_noise_floor / voice->dsp.synth_gain;
|
||||
} else {
|
||||
/* Worst case */
|
||||
|
|
Loading…
Reference in a new issue