summary refs log tree commit diff
path: root/quantum/process_keycode/process_audio.c
diff options
context:
space:
mode:
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;
     }