From 2bf6c7a345414bd2649aaab2a313e48f5cacabb9 Mon Sep 17 00:00:00 2001 From: Tom Yaxley Date: Sun, 26 May 2019 03:05:57 +1000 Subject: [PATCH] Fixed MIDI sync skip issue in LSDJ --- src/RetroPlugInstrument.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RetroPlugInstrument.cpp b/src/RetroPlugInstrument.cpp index 6b68391ce..a8a89c630 100644 --- a/src/RetroPlugInstrument.cpp +++ b/src/RetroPlugInstrument.cpp @@ -109,7 +109,8 @@ int RetroPlugInstrument::UnserializeState(const IByteChunk& chunk, int startPos) } void RetroPlugInstrument::GenerateMidiClock(SameBoyPlug* plug, int frameCount, bool transportChanged) { - if (transportChanged) { + Lsdj& lsdj = _plug.lsdj(); + if (transportChanged && _plug.midiSync() && !lsdj.found) { if (mTimeInfo.mTransportIsRunning) { plug->sendMidiByte(0, 0xFA); } else { @@ -118,7 +119,6 @@ void RetroPlugInstrument::GenerateMidiClock(SameBoyPlug* plug, int frameCount, b } if (mTimeInfo.mTransportIsRunning) { - Lsdj& lsdj = _plug.lsdj(); if (lsdj.found) { switch (lsdj.syncMode) { case LsdjSyncModes::Midi: