diff options
Diffstat (limited to 'quantum/audio.c')
| -rw-r--r-- | quantum/audio.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/quantum/audio.c b/quantum/audio.c index 3ccd5ab9b..602366973 100644 --- a/quantum/audio.c +++ b/quantum/audio.c | |||
| @@ -351,7 +351,7 @@ void play_notes(float (*np)[][2], uint8_t n_count, bool n_repeat, float n_rest) | |||
| 351 | 351 | ||
| 352 | if (audio_config.enable) { | 352 | if (audio_config.enable) { |
| 353 | 353 | ||
| 354 | if (note) | 354 | if (note || notes) |
| 355 | stop_all_notes(); | 355 | stop_all_notes(); |
| 356 | 356 | ||
| 357 | notes_pointer = np; | 357 | notes_pointer = np; |
| @@ -406,7 +406,7 @@ void play_note(double freq, int vol) { | |||
| 406 | 406 | ||
| 407 | if (audio_config.enable && voices < 8) { | 407 | if (audio_config.enable && voices < 8) { |
| 408 | 408 | ||
| 409 | if (notes) | 409 | if (note || notes) |
| 410 | stop_all_notes(); | 410 | stop_all_notes(); |
| 411 | #ifdef PWM_AUDIO | 411 | #ifdef PWM_AUDIO |
| 412 | freq = freq / SAMPLE_RATE; | 412 | freq = freq / SAMPLE_RATE; |
| @@ -471,3 +471,16 @@ void increase_tempo(uint8_t tempo_change) | |||
| 471 | } | 471 | } |
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | //------------------------------------------------------------------------------ | ||
| 475 | // Override these functions in your keymap file to play different tunes on | ||
| 476 | // startup and bootloader jump | ||
| 477 | __attribute__ ((weak)) | ||
| 478 | void play_startup_tone() | ||
| 479 | { | ||
| 480 | } | ||
| 481 | |||
| 482 | __attribute__ ((weak)) | ||
| 483 | void play_goodbye_tone() | ||
| 484 | { | ||
| 485 | } | ||
| 486 | //------------------------------------------------------------------------------ | ||
