From 8157b374387171d97f4eb03cae6e6c3e07613d61 Mon Sep 17 00:00:00 2001 From: David Hoelscher Date: Thu, 2 Jan 2025 01:10:07 -0600 Subject: always return audio pin to 0 on ARM (#24503) --- quantum/audio/audio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'quantum/audio') diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index b2611c5f09..2cc3c2d661 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -258,11 +258,10 @@ void audio_stop_tone(float pitch) { for (int i = AUDIO_TONE_STACKSIZE - 1; i >= 0; i--) { found = (tones[i].pitch == pitch); if (found) { - tones[i] = (musical_tone_t){.time_started = 0, .pitch = -1.0f, .duration = 0}; for (int j = i; (j < AUDIO_TONE_STACKSIZE - 1); j++) { - tones[j] = tones[j + 1]; - tones[j + 1] = (musical_tone_t){.time_started = 0, .pitch = -1.0f, .duration = 0}; + tones[j] = tones[j + 1]; } + tones[AUDIO_TONE_STACKSIZE - 1] = (musical_tone_t){.time_started = 0, .pitch = -1.0f, .duration = 0}; break; } } -- cgit v1.2.3