Music Visualizer

Dependencies:   mbed SDFileSystem NeoStrip PinDetect

Revision:
1:2e32808bfc2b
Parent:
0:adce77867281
Child:
4:6fbdec5bc602
--- a/main.cpp	Thu Apr 30 01:45:25 2020 +0000
+++ b/main.cpp	Thu Apr 30 01:54:03 2020 +0000
@@ -277,12 +277,14 @@
                                     src = src ? 0 : 1;
                                     if (src) {
                                         thread2.start(sound_thread);
+                                        mute = 1;
                                     } else {
                                         waver.set_play_state(0);
                                         while (thread2.get_state() == Thread::Running) {
                                             Thread::yield();
                                         }
                                         thread2.terminate();
+                                        mute = 0;
                                     }
                                     sd_mtx.unlock();
                                     Thread::wait(100);