From 6ae8171b05e4a1368ebd9558bd9bb2bf26d052ab Mon Sep 17 00:00:00 2001 From: Nebuleon Fumika <2391500+Nebuleon@users.noreply.github.com> Date: Mon, 31 Jul 2023 18:57:00 -0400 Subject: [PATCH] audio: Don't play the first note of zero-note melodies --- quantum/audio/audio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index b9b21066cb08..28c826751723 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -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(); }