summaryrefslogtreecommitdiffstats
path: root/quantum/audio.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-04-15 16:19:43 -0400
committerJack Humbert <jack.humb@gmail.com>2016-04-15 16:19:43 -0400
commit91119636631f24bd1bf97f32c3d39f8828da625f (patch)
treeb301cb936ef1985a00e634fa98fa90ccdc1b98f8 /quantum/audio.c
parentbdb6dceaebc358dd4aae593d51d3ba0dd61858a9 (diff)
parent2557b91644d9565c43f0e5c27d45788d4a47f3eb (diff)
Merge pull request #256 from jackhumbert/new_defaults
New default planck layout, audio fixes, makefile overwrites, tri-layer quantum-wide
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 f29d941d7c..50e5505fe0 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) {