diff --git a/quantum/quantum.h b/quantum/quantum.h index 86b717e445..9d85805b8a 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -69,6 +69,7 @@ extern layer_state_t layer_state; # include "process_midi.h" #endif +/* jww #ifdef AUDIO_ENABLE # include "audio.h" # include "process_audio.h" @@ -76,6 +77,7 @@ extern layer_state_t layer_state; # include "process_clicky.h" # endif #endif + */ #ifdef STENO_ENABLE # include "process_steno.h" diff --git a/quantum/quantum.c b/quantum/quantum.c index e60378afe4..c41a6537ac 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -41,6 +41,16 @@ # include "haptic.h" #endif +// jww +#ifdef AUDIO_ENABLE +# include "audio.h" +# include "process_audio.h" +# ifdef AUDIO_CLICKY +# include "process_clicky.h" +# endif +#endif +// jww + #ifdef AUDIO_ENABLE # ifndef GOODBYE_SONG # define GOODBYE_SONG SONG(GOODBYE_SOUND) diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 2beccbd8f9..877fe617b3 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -15,6 +15,19 @@ */ #include "process_music.h" + +// jww +#ifdef AUDIO_ENABLE +# include "audio.h" +# include "process_audio.h" +# ifdef AUDIO_CLICKY +# include "process_clicky.h" +# endif +#endif +// jww + + + #ifdef AUDIO_ENABLE # include "process_audio.h" #endif diff --git a/quantum/process_keycode/process_magic.c b/quantum/process_keycode/process_magic.c index d5cff4f12a..ce0cccbb7f 100644 --- a/quantum/process_keycode/process_magic.c +++ b/quantum/process_keycode/process_magic.c @@ -15,6 +15,18 @@ */ #include "process_magic.h" + +// jww +#ifdef AUDIO_ENABLE +# include "audio.h" +# include "process_audio.h" +# ifdef AUDIO_CLICKY +# include "process_clicky.h" +# endif +#endif +// jww + + #ifdef AUDIO_ENABLE # ifndef AG_NORM_SONG # define AG_NORM_SONG SONG(AG_NORM_SOUND) diff --git a/quantum/process_keycode/process_clicky.c b/quantum/process_keycode/process_clicky.c index 6ab382d4aa..6f583e4b6b 100644 --- a/quantum/process_keycode/process_clicky.c +++ b/quantum/process_keycode/process_clicky.c @@ -101,7 +101,10 @@ bool process_clicky(uint16_t keycode, keyrecord_t *record) { } if (audio_config.enable && audio_config.clicky_enable) { - if (record->event.pressed) { // Leave this separate so it's easier to add upstroke sound + // siehe quantum/action.h und quantum/keyboard.h + if (record->event.pressed && + record->tap.count == 0 && + ((keycode & QK_MOD_TAP)==QK_MOD_TAP || (keycode & QK_LAYER_TAP)==QK_LAYER_TAP)) { // Leave this separate so it's easier to add upstroke sound if (keycode != AU_OFF && keycode != AU_TOG) { // DO NOT PLAY if audio will be disabled, and causes issuse on ARM clicky_play(); } diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index 49bb309e80..80c792f8cc 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -19,6 +19,17 @@ #include "timer.h" #include "wait.h" +// jww +#ifdef AUDIO_ENABLE +# include "audio.h" +# include "process_audio.h" +# ifdef AUDIO_CLICKY +# include "process_clicky.h" +# endif +#endif +// jww + + /* audio system: * * audio.[ch] takes care of all overall state, tracking the actively playing