summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDipl.-Ing. Raoul Rubien, BSc <rubienr@sbox.tugraz.at>2021-12-12 01:58:25 +0100
committerGitHub <noreply@github.com>2021-12-11 16:58:25 -0800
commit415faebd6563fa07e2f0c830546217bdb621128f (patch)
tree18a02b940b1b340d0bf0f64c454f203947e8564a
parentdd994e72ad0e1f441331d208ca2b376835e0b9b5 (diff)
added missing audio_off_user() callback (#15457)
Co-authored-by: Raoul Rubien <raoul.rubienr@gmail.com>
-rw-r--r--quantum/audio/audio.c3
-rw-r--r--quantum/process_keycode/process_audio.c1
-rw-r--r--quantum/process_keycode/process_audio.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c
index 49bb309e80..b3d6389dd5 100644
--- a/quantum/audio/audio.c
+++ b/quantum/audio/audio.c
@@ -160,6 +160,8 @@ void audio_toggle(void) {
eeconfig_update_audio(audio_config.raw);
if (audio_config.enable) {
audio_on_user();
+ } else {
+ audio_off_user();
}
}
@@ -172,6 +174,7 @@ void audio_on(void) {
void audio_off(void) {
PLAY_SONG(audio_off_song);
+ audio_off_user();
wait_ms(100);
audio_stop_all();
audio_config.enable = 0;
diff --git a/quantum/process_keycode/process_audio.c b/quantum/process_keycode/process_audio.c
index 3b5fa8490b..23664721e8 100644
--- a/quantum/process_keycode/process_audio.c
+++ b/quantum/process_keycode/process_audio.c
@@ -57,3 +57,4 @@ void process_audio_noteoff(uint8_t note) { stop_note(compute_freq_for_midi_note(
void process_audio_all_notes_off(void) { stop_all_notes(); }
__attribute__((weak)) void audio_on_user() {}
+__attribute__((weak)) void audio_off_user() {}
diff --git a/quantum/process_keycode/process_audio.h b/quantum/process_keycode/process_audio.h
index d89a834ea8..42cfab4af2 100644
--- a/quantum/process_keycode/process_audio.h
+++ b/quantum/process_keycode/process_audio.h
@@ -8,3 +8,4 @@ void process_audio_noteoff(uint8_t note);
void process_audio_all_notes_off(void);
void audio_on_user(void);
+void audio_off_user(void);