summaryrefslogtreecommitdiffstats
path: root/quantum/audio/voices.c
diff options
context:
space:
mode:
authorIBNobody <IBNobody@users.noreply.github.com>2016-05-03 19:56:40 +0200
committerJack Humbert <jack.humb@gmail.com>2016-05-03 19:56:40 +0200
commit83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3 (patch)
treefd0c9714f93e1afec478ddc42a86a6823136ad5f /quantum/audio/voices.c
parent2c070163ffffffde546fb00acaa2fbb96b93da64 (diff)
downloadqmk_firmware-83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3.tar.gz
qmk_firmware-83e1cc241e3aabd69f6cdcd2581477d4b85bb8d3.tar.xz
Clarified audio.c (#302)
* Updated personal layouts * tweaked personal * Nightly - Audio Cleanup Refactored the LUTs. Abstracted some of the registers out of audio to use more functional names. Split audio into audio and audio_pwm. WIP * nightly - collapsed code * Added check for note playing to LEDs
Diffstat (limited to 'quantum/audio/voices.c')
-rw-r--r--quantum/audio/voices.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c
index d2316ba1b..6d4172a06 100644
--- a/quantum/audio/voices.c
+++ b/quantum/audio/voices.c
@@ -1,6 +1,6 @@
#include "voices.h"
+#include "audio.h"
#include "stdlib.h"
-#include "vibrato_lut.h"
// these are imported from audio.c
extern uint16_t envelope_index;
@@ -109,7 +109,7 @@ float voice_envelope(float frequency) {
case 0 ... VOICE_VIBRATO_DELAY:
break;
default:
- frequency = frequency * VIBRATO_LUT[(int)fmod((((float)compensated_index - (VOICE_VIBRATO_DELAY + 1))/1000*VOICE_VIBRATO_SPEED), VIBRATO_LUT_LENGTH)];
+ frequency = frequency * vibrato_lut[(int)fmod((((float)compensated_index - (VOICE_VIBRATO_DELAY + 1))/1000*VOICE_VIBRATO_SPEED), VIBRATO_LUT_LENGTH)];
break;
}
break;
@@ -160,4 +160,6 @@ float voice_envelope(float frequency) {
}
return frequency;
-} \ No newline at end of file
+}
+
+