summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIBNobody <ibnobody@gmail.com>2016-04-17 17:41:07 +0200
committerIBNobody <ibnobody@gmail.com>2016-04-17 17:41:07 +0200
commitc940e87235c9fe26f5c7451464af54a493270a68 (patch)
tree99601f27e9879eb3e8d3eb97e83c4ae2fc8e1272
parent29e495be2a57d1eb41699909b204c12ac6bc4c0e (diff)
downloadqmk_firmware-c940e87235c9fe26f5c7451464af54a493270a68.tar.gz
qmk_firmware-c940e87235c9fe26f5c7451464af54a493270a68.tar.xz
fixed single note play copy/paste bug
-rw-r--r--quantum/audio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/quantum/audio.c b/quantum/audio.c
index 9b9589f13..58b9ab76b 100644
--- a/quantum/audio.c
+++ b/quantum/audio.c
@@ -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)) {