diff options
Diffstat (limited to 'quantum/audio/audio.c')
-rw-r--r-- | quantum/audio/audio.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index baa364eec..8e8570d26 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c | |||
@@ -555,7 +555,10 @@ ISR(TIMER1_COMPA_vect) | |||
555 | note_position++; | 555 | note_position++; |
556 | bool end_of_note = false; | 556 | bool end_of_note = false; |
557 | if (TIMER_1_PERIOD > 0) { | 557 | if (TIMER_1_PERIOD > 0) { |
558 | end_of_note = (note_position >= (note_length / TIMER_1_PERIOD * 0xFFFF - 1)); | 558 | if (!note_resting) |
559 | end_of_note = (note_position >= (note_length / TIMER_1_PERIOD * 0xFFFF - 1)); | ||
560 | else | ||
561 | end_of_note = (note_position >= (note_length)); | ||
559 | } else { | 562 | } else { |
560 | end_of_note = (note_position >= (note_length)); | 563 | end_of_note = (note_position >= (note_length)); |
561 | } | 564 | } |