OSDN Git Service

Revert Change sustained notes not to drop when opt_overlap_voice_allow is enabled
authorShoichi Tamuki <tamuki@linet.gr.jp>
Wed, 7 Dec 2011 13:26:06 +0000 (13:26 +0000)
committerShoichi Tamuki <tamuki@linet.gr.jp>
Wed, 7 Dec 2011 13:26:06 +0000 (13:26 +0000)
ChangeLog
timidity/playmidi.c

index 8e48d22..d1bd0ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-12-07  TAMUKI Shoichi <tamuki@linet.gr.jp>
+
+       * timidity/playmidi.c: About 6 years ago, a simple patch was
+         merged, which changed sustained notes not to drop when
+         opt_overlap_voice_allow is enabled.  Perhaps, this might
+         have a good effect in a certain case, however it often
+         misses the tracer display.  So, I reverted the patch as a
+         workaround.
+
 2011-12-06  TAMUKI Shoichi <tamuki@linet.gr.jp>
 
        * interface/Makefile.am, interface/timidity.el,
index 6a1e147..724cf6e 100644 (file)
@@ -2136,7 +2136,8 @@ static int find_voice(MidiEvent *e)
        AlternateAssign *altassign;
        int i, lowest = -1;
        
-       status_check = (opt_overlap_voice_allow) ? VOICE_SUSTAINED : 0xff;
+       status_check = (opt_overlap_voice_allow)
+                       ? (VOICE_OFF | VOICE_SUSTAINED) : 0xff;
        mono_check = channel[ch].mono;
        altassign = find_altassign(channel[ch].altassign, note);
        for (i = 0; i < upper_voices; i++)
@@ -2146,12 +2147,9 @@ static int find_voice(MidiEvent *e)
                }
        for (i = 0; i < upper_voices; i++)
                if (voice[i].status != VOICE_FREE && voice[i].channel == ch) {
-                       if (voice[i].note == note && (voice[i].status & status_check)) {
-                               if (opt_overlap_voice_allow)
-                                       finish_note(i); /* drop sustain */
-                               else
-                                       kill_note(i);
-                       } else if (mono_check)
+                       if (voice[i].note == note && (voice[i].status & status_check))
+                               kill_note(i);
+                       else if (mono_check)
                                kill_note(i);
                        else if (altassign && find_altassign(altassign, voice[i].note))
                                kill_note(i);