summaryrefslogtreecommitdiffstats
path: root/quantum
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-02-08 21:16:06 +0100
committerJack Humbert <jack.humb@gmail.com>2018-02-08 21:16:06 +0100
commit6835ae82095427b2b5d5b3839a8d54845244169b (patch)
treeebd3a740ea7cc58b6ecc82a18044ec44c8eebb77 /quantum
parentc5d81a84a0519c78de1b5e165f5f2c1eb773bc11 (diff)
downloadqmk_firmware-6835ae82095427b2b5d5b3839a8d54845244169b.tar.gz
qmk_firmware-6835ae82095427b2b5d5b3839a8d54845244169b.tar.xz
Add the ability to disable Music Mode completely (#2339)
* Skip process_music in NO_MUSIC_MODE is defined * Skip matrix_scan_music if NO_MUSIC_MODE is defined * Skip music_all_notes_off if NO_MUSIC_MODE is defined * Leave matrix_scan_music in, because it reduces firmware size by 150b.... * Add docs for NO_MUSIC_MODE
Diffstat (limited to 'quantum')
-rw-r--r--quantum/quantum.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index bd95d5ea8..66feca2f2 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -147,7 +147,7 @@ void reset_keyboard(void) {
#if defined(MIDI_ENABLE) && defined(MIDI_BASIC)
process_midi_all_notes_off();
#endif
-#if defined(AUDIO_ENABLE)
+#if defined(AUDIO_ENABLE) && !defined(NO_MUSIC_MODE)
music_all_notes_off();
uint16_t timer_start = timer_read();
PLAY_SONG(goodbye_song);
@@ -236,7 +236,7 @@ bool process_record_quantum(keyrecord_t *record) {
#ifdef STENO_ENABLE
process_steno(keycode, record) &&
#endif
- #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))
+ #if ( defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC))) && !defined(NO_MUSIC_MODE)
process_music(keycode, record) &&
#endif
#ifdef TAP_DANCE_ENABLE
@@ -834,7 +834,7 @@ void matrix_init_quantum() {
}
void matrix_scan_quantum() {
- #ifdef AUDIO_ENABLE
+ #if defined(AUDIO_ENABLE)
matrix_scan_music();
#endif