Skip to content

Commit

Permalink
added missing audio_off_user() callback (#15457)
Browse files Browse the repository at this point in the history
Co-authored-by: Raoul Rubien <[email protected]>
  • Loading branch information
rubienr and Raoul Rubien authored Dec 12, 2021
1 parent dd994e7 commit 415faeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions quantum/audio/audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}

Expand All @@ -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;
Expand Down
1 change: 1 addition & 0 deletions quantum/process_keycode/process_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}
1 change: 1 addition & 0 deletions quantum/process_keycode/process_audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit 415faeb

Please sign in to comment.