diff options
author | David Hoelscher <[email protected]> | 2025-01-02 01:10:07 -0600 |
---|---|---|
committer | GitHub <[email protected]> | 2025-01-01 23:10:07 -0800 |
commit | 8157b374387171d97f4eb03cae6e6c3e07613d61 (patch) | |
tree | cadeaa029504d42fb41605d5b052e68bb01cec94 /quantum/audio | |
parent | d5a042498770050a3d2f002540413ba14dfaf8d1 (diff) | |
download | qmk_firmware-8157b374387171d97f4eb03cae6e6c3e07613d61.tar.gz qmk_firmware-8157b374387171d97f4eb03cae6e6c3e07613d61.zip |
always return audio pin to 0 on ARM (#24503)
Diffstat (limited to 'quantum/audio')
-rw-r--r-- | quantum/audio/audio.c | 5 |
1 files changed, 2 insertions, 3 deletions
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; } } |