From 569fdb7edf59ce4b0030ac5f6804b4b8e7ce7194 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sat, 10 May 2008 02:00:39 +0000 Subject: [PATCH] - Changed Gf1Envelope::Recompute() so that when the envelope runs out in midi_timiditylike mode, it doesn't immediately kill the note. This doesn't appear to match what TiMidity does, but I think it sounds better to turn the loop off and let the note end naturally instead of abruptly shutting it off. SVN r960 (trunk) --- src/timidity/mix.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/timidity/mix.cpp b/src/timidity/mix.cpp index e36f234d3..46fccd97d 100644 --- a/src/timidity/mix.cpp +++ b/src/timidity/mix.cpp @@ -120,8 +120,11 @@ bool GF1Envelope::Recompute(Voice *v) v->status &= ~(VOICE_SUSTAINING | VOICE_LPE); v->status |= VOICE_RELEASING; if (midi_timiditylike) - { /* kill the voice */ - v->status |= VOICE_STOPPING; + { /* kill the voice ... or not */ + if (volume <= 0) + { + v->status |= VOICE_STOPPING; + } return 1; } else