summaryrefslogtreecommitdiff
path: root/quantum/process_keycode/process_audio.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-07-22 00:14:26 -0400
committerJack Humbert <jack.humb@gmail.com>2017-07-23 14:59:29 -0400
commit415d38ba9ee20424ce354ed5f8e590fae58b863f (patch)
tree663b609ace954533aff4a964b4c7cb3300bd73cd /quantum/process_keycode/process_audio.c
parent9abbbe70890ee0a0c619411c76a2c7b82b1b49d5 (diff)
adds music mode, music mode songs, music mask
Diffstat (limited to 'quantum/process_keycode/process_audio.c')
-rw-r--r--quantum/process_keycode/process_audio.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c
index 0b6380ed39..eb74796fa7 100644
--- a/quantum/process_keycode/process_audio.c
+++ b/quantum/process_keycode/process_audio.c
@@ -1,6 +1,11 @@
#include "audio.h"
#include "process_audio.h"
+#ifndef VOICE_CHANGE_SONG
+ #define VOICE_CHANGE_SONG SONG(VOICE_CHANGE_SOUND)
+#endif
+float voice_change_song[][2] = VOICE_CHANGE_SONG;
+
static float compute_freq_for_midi_note(uint8_t note)
{
// https://en.wikipedia.org/wiki/MIDI_tuning_standard
@@ -20,12 +25,9 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) {
}
if (keycode == AU_TOG && record->event.pressed) {
- if (is_audio_on())
- {
+ if (is_audio_on()) {
audio_off();
- }
- else
- {
+ } else {
audio_on();
}
return false;
@@ -33,13 +35,13 @@ bool process_audio(uint16_t keycode, keyrecord_t *record) {
if (keycode == MUV_IN && record->event.pressed) {
voice_iterate();
- music_scale_user();
+ PLAY_SONG(voice_change_song);
return false;
}
if (keycode == MUV_DE && record->event.pressed) {
voice_deiterate();
- music_scale_user();
+ PLAY_SONG(voice_change_song);
return false;
}