X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=quantum%2Fprocess_keycode%2Fprocess_audio.c;h=eb74796fa7a9dd6f7daf61ab642e0b803c9d7ad4;hb=415d38ba9ee20424ce354ed5f8e590fae58b863f;hp=0b6380ed39ab04cb1a2d4bc8cc985981e633e905;hpb=3e41cde9f99778ca30c03b97470c32780379db43;p=qmk_firmware.git diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c index 0b6380ed3..eb74796fa 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; }