Skip to content

Commit

Permalink
audio: Don't play the first note of zero-note melodies (qmk#21661)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebuleon authored and jesperhellberg committed Sep 9, 2023
1 parent 4082fc8 commit 60ebfd0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions quantum/audio/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,10 @@ void audio_play_melody(float (*np)[][2], uint16_t n_count, bool n_repeat) {
return;
}

if (n_count == 0) {
return;
}

if (!audio_initialized) {
audio_init();
}
Expand Down

0 comments on commit 60ebfd0

Please sign in to comment.