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.
Music/Music.h
- Committer:
- joshdavy
- Date:
- 2019-07-17
- Revision:
- 20:0b842eddb176
- Parent:
- 15:1cb1eb0136aa
File content as of revision 20:0b842eddb176:
#ifndef MUSIC_H
#define MUSIC_H
/*Music Class*/
#include "mbed.h"
#include "N5110.h"
#include "Gamepad.h"
#include "Sprite.h"
#include "Player.h"
/** Music Class
@brief The Music Class handles the playing of the background music while playing
the game. It uses the buzzer with PWM audio to play complex waveforms through
a standard 5V pin of the board. See presentation for more detail how this works.
@version 1.0
@author Joshua Davy el17jd
@date April 2019
*/
class Music {
public:
Music();
~Music();
void init(const int* data,int length);
void play_next();
private:
const int* _data;
int _index;
int _length;
};
#endif