Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem mbed-rtos mbed wave_player 4DGL-uLCD-SE PinDetect
music.h
00001 #include "PinDetect.h" 00002 #include "SDFileSystem.h" 00003 #include "wave_player.h" 00004 #include "rtos.h" 00005 00006 class Music 00007 { 00008 private: 00009 wave_player *speaker; 00010 Thread *main_music_thread; 00011 00012 public: 00013 Music(wave_player &speaker_arg); 00014 00015 void playMainMusic(); //starts thread to play main music 00016 void stopMainMusic(); //ends thread to play main music 00017 00018 //add other audio clip methods here 00019 /* 00020 * 00021 * 00022 */ 00023 00024 protected: 00025 static void thread_helper(const void *args); 00026 void main_music(); //actually plays the main music on loop 00027 };
Generated on Fri Jul 22 2022 05:53:26 by
1.7.2