From 6a3c66776cb10888b24400526241b46deeb051a8 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 20 Jul 2017 23:57:11 -0400 Subject: clean-up planck and preonic keymaps, move audio stuff around --- quantum/audio/audio.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'quantum/audio/audio.c') diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index c924f2bd5..5b8563093 100644 --- a/quantum/audio/audio.c +++ b/quantum/audio/audio.c @@ -13,6 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include #include //#include @@ -119,9 +120,17 @@ audio_config_t audio_config; uint16_t envelope_index = 0; bool glissando = true; +#ifndef STARTUP_SONG + #define STARTUP_SONG SONG(STARTUP_SOUND) +#endif +float startup_song[][2] = STARTUP_SONG; + void audio_init() { + if (audio_initialized) + return; + // Check EEPROM if (!eeconfig_is_enabled()) { @@ -169,6 +178,11 @@ void audio_init() #endif audio_initialized = true; + + if (audio_config.enable) { + PLAY_NOTE_ARRAY(startup_song, false, LEGATO); + } + } void stop_all_notes() -- cgit v1.2.3