diff options
author | Jack Humbert <[email protected]> | 2017-07-20 23:57:11 -0400 |
---|---|---|
committer | Jack Humbert <[email protected]> | 2017-07-23 14:59:29 -0400 |
commit | 6a3c66776cb10888b24400526241b46deeb051a8 (patch) | |
tree | 7604aafe7087d9ab40aa0bb6bc603975e31d7e2e /quantum/audio/audio.c | |
parent | 8edb67b08242f2ab641d7e658a0a7adb579bbae2 (diff) | |
download | qmk_firmware-6a3c66776cb10888b24400526241b46deeb051a8.tar.gz qmk_firmware-6a3c66776cb10888b24400526241b46deeb051a8.zip |
clean-up planck and preonic keymaps, move audio stuff around
Diffstat (limited to 'quantum/audio/audio.c')
-rw-r--r-- | quantum/audio/audio.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c index c924f2bd58..5b85630932 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 <http://www.gnu.org/licenses/>. */ + #include <stdio.h> #include <string.h> //#include <math.h> @@ -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() |