]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
add silent notes
authorJack Humbert <jack.humb@gmail.com>
Tue, 5 Apr 2016 13:21:44 +0000 (09:21 -0400)
committerJack Humbert <jack.humb@gmail.com>
Tue, 5 Apr 2016 13:21:44 +0000 (09:21 -0400)
quantum/audio.c

index 3a3a1a491062961a724d2de4ea10d641630098f8..f29d941d7cce0be321a060b38ae2278806a9223c 100644 (file)
@@ -247,6 +247,9 @@ ISR(TIMER3_COMPA_vect) {
             if (note_frequency > 0) {
                 ICR3 = (int)(((double)F_CPU) / note_frequency); // Set max to the period
                 OCR3A = (int)(((double)F_CPU) / note_frequency) >> 1; // Set compare to half the period
+            } else {
+                ICR3 = 0;
+                OCR3A = 0;
             }
         #endif