Fix high notes occasionally not initing properly

This commit is contained in:
Sean Maas 2021-03-04 22:32:54 -05:00
parent 3573b75b4b
commit c6e85d76d0

View file

@ -33,7 +33,7 @@ void play_notes(struct Note *notes) {
struct Note *note = &notes[i];
if (note->enabled && note->sound != NULL) {
if (note->needsInit) {
if (note->needsInit || ((SCHANNEL_CR(i) & SCHANNEL_ENABLE) && (note->frequency >= 2.0f) != (bool)(high_freqs & BIT(i)))) {
const struct AudioBankSample *sample = note->sound->sample;
const u32 loop = (sample->loop->count ? SOUND_REPEAT : SOUND_ONE_SHOT);