Josh Davy / Mbed OS MUSIC_K64F
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Music.h Source File

Music.h

00001 #ifndef MUSIC_H
00002 #define MUSIC_H
00003 
00004 /*Music Class*/
00005 #include "mbed.h"
00006 
00007 
00008 /** Music Class
00009 
00010 @brief The Music Class handles the playing of the background music while playing
00011 the game. It uses the buzzer with PWM audio to play complex waveforms through
00012 a standard 5V pin of the board. See presentation for more detail how this works.
00013 @version 1.0
00014 
00015 @author Joshua Davy el17jd
00016 
00017 @date April 2019
00018 
00019 */
00020 
00021 class Music {
00022 
00023 public:
00024     Music();
00025     ~Music();
00026     void init(const int* data,int length);
00027     void play_next();
00028 
00029     
00030 private:
00031     const int*  _data;
00032     int _index;
00033     int _length;
00034     
00035 
00036 };
00037 #endif