summaryrefslogtreecommitdiff
path: root/muse2/muse/dssihost.cpp
diff options
context:
space:
mode:
authorTim E. Real <termtech@rogers.com>2011-05-05 22:55:49 +0000
committerTim E. Real <termtech@rogers.com>2011-05-05 22:55:49 +0000
commite35ae165dd7096942e9641dfd9c6d6fc2a89f1c7 (patch)
treea46a4e59bff5ecbb73f2e393303a2281cb86f640 /muse2/muse/dssihost.cpp
parent548a9ee76ec16b19f7fc3a387890585575b08321 (diff)
Fixed regression: Plugins would not restore saved control state when loading song.
Diffstat (limited to 'muse2/muse/dssihost.cpp')
-rw-r--r--muse2/muse/dssihost.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/muse2/muse/dssihost.cpp b/muse2/muse/dssihost.cpp
index e5ccd628..cbb908e6 100644
--- a/muse2/muse/dssihost.cpp
+++ b/muse2/muse/dssihost.cpp
@@ -2402,6 +2402,14 @@ iMPEvent DssiSynthIF::getData(MidiPort* /*mp*/, MPEventList* el, iMPEvent i, uns
// If the events happened even before current frame - n, make sure they are counted immediately as zero-frame.
//evframe = (pos + frameOffset > v.frame + n) ? 0 : v.frame - pos - frameOffset + n;
evframe = (syncFrame > v.frame + n) ? 0 : v.frame - syncFrame + n;
+ // Protection. Observed this condition. Why? Supposed to be linear timestamps.
+ if(found && evframe < frame)
+ {
+ printf("DssiSynthIF::getData *** Error: evframe:%lu < frame:%lu idx:%lu val:%f unique:%d\n",
+ evframe, v.frame, v.idx, v.value, v.unique);
+ // Just make it equal to the current frame so it gets processed right away.
+ evframe = frame;
+ }
//printf("DssiSynthIF::getData ctrl dssi:%d idx:%lu frame:%lu val:%f unique:%d evframe:%lu\n",
// synth->_isDssiVst, v.idx, v.frame, v.value, v.unique, evframe); // REMOVE Tim.