]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
fixed single note play copy/paste bug
authorIBNobody <ibnobody@gmail.com>
Sun, 17 Apr 2016 15:41:07 +0000 (10:41 -0500)
committerIBNobody <ibnobody@gmail.com>
Sun, 17 Apr 2016 15:41:07 +0000 (10:41 -0500)
quantum/audio.c

index 9b9589f1337e235689080f33a8c2c8080e618384..58b9ab76bf25d58e6a4a706c8e4efc6ec310b2ef 100644 (file)
@@ -257,7 +257,7 @@ ISR(TIMER3_COMPA_vect) {
                     place = 0.0;
                 }
                 ICR3 = (int)(((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)); // Set max to the period
-                OCR3A = (int)((((double)F_CPU) / (note_frequency * CPU_PRESCALER)) * note_timbre); // Set compare to half the period
+                OCR3A = (int)((((double)F_CPU) /(frequencies[voice_place] * CPU_PRESCALER)) * note_timbre); // Set compare to half the period
                 //OCR3A = (int)(((double)F_CPU) / (frequencies[voice_place] * CPU_PRESCALER)) >> 1 * duty_place; // Set compare to half the period
                 place++;
                 // if (duty_counter > (frequencies[voice_place] / 500)) {