GUI: add a hint when an ins cannot be previewed

This commit is contained in:
tildearrow 2023-10-15 17:02:25 -05:00
parent 256140bc32
commit 061b8e7aa1
8 changed files with 32 additions and 6 deletions

View file

@ -3106,7 +3106,7 @@ void DivEngine::noteOff(int chan) {
BUSY_END;
}
void DivEngine::autoNoteOn(int ch, int ins, int note, int vol) {
bool DivEngine::autoNoteOn(int ch, int ins, int note, int vol) {
bool isViable[DIV_MAX_CHANS];
bool canPlayAnyway=false;
bool notInViableChannel=false;
@ -3142,7 +3142,7 @@ void DivEngine::autoNoteOn(int ch, int ins, int note, int vol) {
}
}
if (!canPlayAnyway) return;
if (!canPlayAnyway) return false;
// 2. find a free channel
do {
@ -3150,7 +3150,7 @@ void DivEngine::autoNoteOn(int ch, int ins, int note, int vol) {
chan[finalChan].midiNote=note;
chan[finalChan].midiAge=midiAgeCounter++;
pendingNotes.push_back(DivNoteEvent(finalChan,ins,note,vol,true));
return;
return true;
}
if (++finalChan>=chans) {
finalChan=0;
@ -3171,6 +3171,7 @@ void DivEngine::autoNoteOn(int ch, int ins, int note, int vol) {
chan[candidate].midiNote=note;
chan[candidate].midiAge=midiAgeCounter++;
pendingNotes.push_back(DivNoteEvent(candidate,ins,note,vol,true));
return true;
}
void DivEngine::autoNoteOff(int ch, int note, int vol) {