diff options
author | IBNobody <protospherex@gmail.com> | 2016-04-15 13:09:42 -0500 |
---|---|---|
committer | IBNobody <protospherex@gmail.com> | 2016-04-15 13:09:42 -0500 |
commit | 39e520c010072aa17c0bcb2c5bfbbee08e010170 (patch) | |
tree | 4f9b28ad7bc26f2b62ee2bd966b04cbd0f1f5e79 /quantum/audio.c | |
parent | 66c1024bd328b687fba0645f70469094e75d624c (diff) | |
parent | ee2ee7f4f049dda385a9db7dddd8e7e91681315b (diff) | |
download | firmware-39e520c010072aa17c0bcb2c5bfbbee08e010170.tar.gz firmware-39e520c010072aa17c0bcb2c5bfbbee08e010170.tar.bz2 firmware-39e520c010072aa17c0bcb2c5bfbbee08e010170.zip |
Prepping for merge with new_defaults
Diffstat (limited to 'quantum/audio.c')
-rw-r--r-- | quantum/audio.c | 7 |
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) { |