diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2016-04-15 16:19:43 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2016-04-15 16:19:43 -0400 |
| commit | 91119636631f24bd1bf97f32c3d39f8828da625f (patch) | |
| tree | b301cb936ef1985a00e634fa98fa90ccdc1b98f8 /quantum/audio.c | |
| parent | bdb6dceaebc358dd4aae593d51d3ba0dd61858a9 (diff) | |
| parent | 2557b91644d9565c43f0e5c27d45788d4a47f3eb (diff) | |
| download | firmware-91119636631f24bd1bf97f32c3d39f8828da625f.tar.gz firmware-91119636631f24bd1bf97f32c3d39f8828da625f.tar.bz2 firmware-91119636631f24bd1bf97f32c3d39f8828da625f.zip | |
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.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) { |
