summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorIBNobody <ibnobody@gmail.com>2016-04-17 22:08:05 -0500
committerIBNobody <ibnobody@gmail.com>2016-04-17 22:08:05 -0500
commitef73ab662812232f5e73c8098a059439dcb201fa (patch)
treed3b0f885d05a62d1d576e1bdb760db6729fd09ff /quantum
parent5c98ad59606ee95b82c27bf2525383a9ec88542b (diff)
Notes Bugfix
Diffstat (limited to 'quantum')
-rw-r--r--quantum/audio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/quantum/audio.c b/quantum/audio.c
index 6023669739..ba85e418ed 100644
--- a/quantum/audio.c
+++ b/quantum/audio.c
@@ -351,7 +351,8 @@ void play_notes(float (*np)[][2], uint8_t n_count, bool n_repeat, float n_rest)
if (audio_config.enable) {
- if (note || notes)
+ // Cancel note if a note is playing
+ if (note)
stop_all_notes();
notes_pointer = np;
@@ -406,7 +407,8 @@ void play_note(double freq, int vol) {
if (audio_config.enable && voices < 8) {
- if (note || notes)
+ // Cancel notes if notes are playing
+ if (notes)
stop_all_notes();
#ifdef PWM_AUDIO
freq = freq / SAMPLE_RATE;