A library for the WTV020SD sound breakout board
Dependents: Nucleo_SoundBoardTest Robot Progetto_finale Progetto_finale_noLCD ... more
Revision 2:d6b7b90b4387, committed 2014-11-24
- Comitter:
- ejteb
- Date:
- Mon Nov 24 20:09:32 2014 +0000
- Parent:
- 1:b24351bba700
- Commit message:
- With playPerhapsAsync(int)
Changed in this revision
soundboard.cpp | Show annotated file Show diff for this revision Revisions of this file |
soundboard.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r b24351bba700 -r d6b7b90b4387 soundboard.cpp --- a/soundboard.cpp Sun Nov 02 11:09:12 2014 +0000 +++ b/soundboard.cpp Mon Nov 24 20:09:32 2014 +0000 @@ -66,3 +66,10 @@ } wait_ms(20); } +void soundboard::playPerhapsAsync(int trackNum) +{ + if(!_busyPin) + { + playAsync(trackNum); + } +}
diff -r b24351bba700 -r d6b7b90b4387 soundboard.h --- a/soundboard.h Sun Nov 02 11:09:12 2014 +0000 +++ b/soundboard.h Mon Nov 24 20:09:32 2014 +0000 @@ -70,6 +70,8 @@ void pause(void); /** sets the volume of the playback. Use VOL_0 through to VOL_7*/ void setVolume(int); + /**plays if something else is not playing**/ + void playPerhapsAsync(int); private: void sendCommand(unsigned int); DigitalOut _resetPin;