summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpurpleP <warrior2031@mail.ru>2016-05-19 15:36:28 +0300
committerJack Humbert <jack.humb@gmail.com>2016-05-19 08:36:28 -0400
commit0275d444d77c9d85d2189b09d8813fb76dc4d566 (patch)
tree605b21c66cc265bbd44f9efb47d82352dbe8c479
parentb732b79b49b098dba8e14493c745075f336747d8 (diff)
fixed small bug with AUDIO_ENABLED (#339)
-rw-r--r--quantum/quantum.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 1e91ac04a4..34c575af42 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -20,7 +20,7 @@ void leader_end(void) {}
uint8_t starting_note = 0x0C;
int offset = 7;
-
+
#ifdef AUDIO_ENABLE
bool music_activated = false;
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
@@ -435,28 +435,29 @@ void matrix_scan_quantum() {
matrix_scan_kb();
}
+#ifdef AUDIO_ENABLE
+ bool is_music_on(void) {
+ return (music_activated != 0);
+ }
-bool is_music_on(void) {
- return (music_activated != 0);
-}
-
-void music_toggle(void) {
- if (!music_activated) {
- music_on();
- } else {
- music_off();
- }
-}
+ void music_toggle(void) {
+ if (!music_activated) {
+ music_on();
+ } else {
+ music_off();
+ }
+ }
-void music_on(void) {
- music_activated = 1;
- music_on_user();
-}
+ void music_on(void) {
+ music_activated = 1;
+ music_on_user();
+ }
-void music_off(void) {
- music_activated = 0;
- stop_all_notes();
-}
+ void music_off(void) {
+ music_activated = 0;
+ stop_all_notes();
+ }
+#endif
__attribute__ ((weak))
-void music_on_user() {} \ No newline at end of file
+void music_on_user() {}