Skip to content

Commit 2bf6c7a

Browse files
committed
Fixed MIDI sync skip issue in LSDJ
1 parent 0e2c116 commit 2bf6c7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RetroPlugInstrument.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ int RetroPlugInstrument::UnserializeState(const IByteChunk& chunk, int startPos)
109109
}
110110

111111
void RetroPlugInstrument::GenerateMidiClock(SameBoyPlug* plug, int frameCount, bool transportChanged) {
112-
if (transportChanged) {
112+
Lsdj& lsdj = _plug.lsdj();
113+
if (transportChanged && _plug.midiSync() && !lsdj.found) {
113114
if (mTimeInfo.mTransportIsRunning) {
114115
plug->sendMidiByte(0, 0xFA);
115116
} else {
@@ -118,7 +119,6 @@ void RetroPlugInstrument::GenerateMidiClock(SameBoyPlug* plug, int frameCount, b
118119
}
119120

120121
if (mTimeInfo.mTransportIsRunning) {
121-
Lsdj& lsdj = _plug.lsdj();
122122
if (lsdj.found) {
123123
switch (lsdj.syncMode) {
124124
case LsdjSyncModes::Midi:

0 commit comments

Comments
 (0)