summaryrefslogtreecommitdiffstats
path: root/quantum/audio.c
diff options
context:
space:
mode:
authorIBNobody <protospherex@gmail.com>2016-04-15 20:09:42 +0200
committerIBNobody <protospherex@gmail.com>2016-04-15 20:09:42 +0200
commit39e520c010072aa17c0bcb2c5bfbbee08e010170 (patch)
tree4f9b28ad7bc26f2b62ee2bd966b04cbd0f1f5e79 /quantum/audio.c
parent66c1024bd328b687fba0645f70469094e75d624c (diff)
parentee2ee7f4f049dda385a9db7dddd8e7e91681315b (diff)
downloadqmk_firmware-39e520c010072aa17c0bcb2c5bfbbee08e010170.tar.gz
qmk_firmware-39e520c010072aa17c0bcb2c5bfbbee08e010170.tar.xz
Prepping for merge with new_defaults
Diffstat (limited to 'quantum/audio.c')
-rw-r--r--quantum/audio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/quantum/audio.c b/quantum/audio.c
index f29d941d7..50e5505fe 100644
--- a/quantum/audio.c
+++ b/quantum/audio.c
@@ -255,7 +255,12 @@ ISR(TIMER3_COMPA_vect) {
note_position++;
- if (note_position >= note_length) {
+ bool end_of_note = false;
+ if (ICR3 > 0)
+ end_of_note = (note_position >= (note_length / ICR3 * 0xFFFF));
+ else
+ end_of_note = (note_position >= (note_length * 0x7FF));
+ if (end_of_note) {
current_note++;
if (current_note >= notes_length) {
if (notes_repeat) {