diff options
author | Jack Humbert <jack.humb@gmail.com> | 2016-04-18 21:03:21 -0400 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2016-04-18 21:03:21 -0400 |
commit | f2c1e9ddd40573f4b44ffc2ec7df1fb76346f627 (patch) | |
tree | da477a9e67e16339267ee0946c3b253c612c7bbf /quantum/audio.c | |
parent | d94960be5b32b6a4019b822550ae09cf802bfcd7 (diff) | |
parent | 499e3096e9021b88a6a705ad7034ccbacb97b975 (diff) |
Merge pull request #262 from IBNobody/master
Fixed keyboard snoring while asleep
Diffstat (limited to 'quantum/audio.c')
-rw-r--r-- | quantum/audio.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/quantum/audio.c b/quantum/audio.c index e0413051a0..627e3d80a1 100644 --- a/quantum/audio.c +++ b/quantum/audio.c @@ -351,6 +351,7 @@ void play_notes(float (*np)[][2], uint8_t n_count, bool n_repeat, float n_rest) if (audio_config.enable) { + // Cancel note if a note is playing if (note) stop_all_notes(); notes = true; @@ -406,6 +407,7 @@ void play_note(double freq, int vol) { if (audio_config.enable && voices < 8) { + // Cancel notes if notes are playing if (notes) stop_all_notes(); note = true; @@ -471,3 +473,16 @@ void increase_tempo(uint8_t tempo_change) } } +//------------------------------------------------------------------------------ +// Override these functions in your keymap file to play different tunes on +// startup and bootloader jump +__attribute__ ((weak)) +void play_startup_tone() +{ +} + +__attribute__ ((weak)) +void play_goodbye_tone() +{ +} +//------------------------------------------------------------------------------ |