summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/audio/audio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c
index baa364eec2..8e8570d26c 100644
--- a/quantum/audio/audio.c
+++ b/quantum/audio/audio.c
@@ -555,7 +555,10 @@ ISR(TIMER1_COMPA_vect)
note_position++;
bool end_of_note = false;
if (TIMER_1_PERIOD > 0) {
- end_of_note = (note_position >= (note_length / TIMER_1_PERIOD * 0xFFFF - 1));
+ if (!note_resting)
+ end_of_note = (note_position >= (note_length / TIMER_1_PERIOD * 0xFFFF - 1));
+ else
+ end_of_note = (note_position >= (note_length));
} else {
end_of_note = (note_position >= (note_length));
}