summaryrefslogtreecommitdiff
path: root/quantum/audio/audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/audio/audio.c')
-rw-r--r--quantum/audio/audio.c14
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()