From c0df205f2db97a917c223a7335689f90ec55c0c5 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Wed, 27 Apr 2022 23:32:07 -0500 Subject: [PATCH] more changes to autoNoteOn now that there's a second prefer ins type, we get rid of DIV_INS_AMIGA check --- src/engine/engine.cpp | 2 +- src/engine/engine.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/engine/engine.cpp b/src/engine/engine.cpp index a62ae36e..3177432c 100644 --- a/src/engine/engine.cpp +++ b/src/engine/engine.cpp @@ -2059,7 +2059,7 @@ void DivEngine::autoNoteOn(int ch, int ins, int note, int vol) { } do { - if ((ins==-1 || ins>=song.insLen || getChannelType(finalChan)==4 || getPreferInsType(finalChan)==getIns(ins)->type || getIns(ins)->type==DIV_INS_AMIGA) && chan[finalChan].midiNote==-1) { + if ((ins==-1 || ins>=song.insLen || getPreferInsType(finalChan)==getIns(ins)->type || getPreferInsSecondType(finalChan)==getIns(ins)->type) && chan[finalChan].midiNote==-1) { chan[finalChan].midiNote=note; pendingNotes.push(DivNoteEvent(finalChan,ins,note,vol,true)); break; diff --git a/src/engine/engine.h b/src/engine/engine.h index 4d12d3bb..b36ee140 100644 --- a/src/engine/engine.h +++ b/src/engine/engine.h @@ -523,6 +523,9 @@ class DivEngine { // get preferred instrument type DivInstrumentType getPreferInsType(int ch); + // get alternate instrument type + DivInstrumentType getPreferInsSecondType(int ch); + // get song system name const char* getSongSystemName();