From 7e57fdbe9c71f6f72403ae6b1885a676c8f1c03a Mon Sep 17 00:00:00 2001 From: Christopher Mason Date: Sun, 31 Aug 2014 03:17:37 +0000 Subject: [PATCH] Fix annoying Ensoniq DOC bug that was causing out-of-tune notes in Synthlab and Diversi-Tune. --- src/sound.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sound.c b/src/sound.c index 59c4944..b7e85e7 100644 --- a/src/sound.c +++ b/src/sound.c @@ -1187,7 +1187,6 @@ doc_sound_end(int osc, int can_repeat, double eff_dsamps, double dsamps) remove_event_doc(osc); } rptr->event = 0; - rptr->cur_acc = 0; /* reset internal accumulator*/ /* check to make sure osc is running */ if(ctl & 0x01) { @@ -1226,7 +1225,9 @@ doc_sound_end(int osc, int can_repeat, double eff_dsamps, double dsamps) start_sound(osc, eff_dsamps, dsamps); return; - } else if((mode == 3) || (omode == 3)) { + } + rptr->cur_acc = 0; /* reset internal accumulator*/ + if((mode == 3) || (omode == 3)) { /* swap mode (even if we're one_shot and partner is swap)! */ /* unless we're one-shot and we hit a 0-byte--then */ /* Olivier Goguel says just stop */