Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added missing audio_off_user() callback #15457

Merged
merged 1 commit into from
Dec 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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);