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@4:afbf3dd71403, 2019-04-06 (annotated)
- Committer:
- joshdavy
- Date:
- Sat Apr 06 11:47:18 2019 +0000
- Revision:
- 4:afbf3dd71403
- Child:
- 5:b9cf407bcc63
Began implemting music playing class
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joshdavy | 4:afbf3dd71403 | 1 | #ifndef MUSIC_H |
joshdavy | 4:afbf3dd71403 | 2 | #define MUSIC_H |
joshdavy | 4:afbf3dd71403 | 3 | |
joshdavy | 4:afbf3dd71403 | 4 | /*Music Class*/ |
joshdavy | 4:afbf3dd71403 | 5 | #include "mbed.h" |
joshdavy | 4:afbf3dd71403 | 6 | #include "N5110.h" |
joshdavy | 4:afbf3dd71403 | 7 | #include "Gamepad.h" |
joshdavy | 4:afbf3dd71403 | 8 | #include "Sprite.h" |
joshdavy | 4:afbf3dd71403 | 9 | #include "Player.h" |
joshdavy | 4:afbf3dd71403 | 10 | #include "SoundData.h" |
joshdavy | 4:afbf3dd71403 | 11 | |
joshdavy | 4:afbf3dd71403 | 12 | |
joshdavy | 4:afbf3dd71403 | 13 | |
joshdavy | 4:afbf3dd71403 | 14 | class Music { |
joshdavy | 4:afbf3dd71403 | 15 | |
joshdavy | 4:afbf3dd71403 | 16 | public: |
joshdavy | 4:afbf3dd71403 | 17 | Music(); |
joshdavy | 4:afbf3dd71403 | 18 | ~Music(); |
joshdavy | 4:afbf3dd71403 | 19 | void init(int * data); |
joshdavy | 4:afbf3dd71403 | 20 | void play_next(); |
joshdavy | 4:afbf3dd71403 | 21 | |
joshdavy | 4:afbf3dd71403 | 22 | |
joshdavy | 4:afbf3dd71403 | 23 | private: |
joshdavy | 4:afbf3dd71403 | 24 | int * _data; |
joshdavy | 4:afbf3dd71403 | 25 | int _index; |
joshdavy | 4:afbf3dd71403 | 26 | PwmOut speaker(PTC10); |
joshdavy | 4:afbf3dd71403 | 27 | |
joshdavy | 4:afbf3dd71403 | 28 | }; |
joshdavy | 4:afbf3dd71403 | 29 | #endif |