more changes to autoNoteOn

now that there's a second prefer ins type, we get rid of DIV_INS_AMIGA check
This commit is contained in:
tildearrow 2022-04-27 23:32:07 -05:00
parent f2b974acc5
commit c0df205f2d
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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();