A test program for the WavPlayer class, works on the RS Animatronic Lab Board
Dependencies: FatFileSystem MSCFileSystem WavPlayer mbed
main.cpp
- Committer:
- p07gbar
- Date:
- 2012-09-19
- Revision:
- 1:5ffbf2bca1b5
- Parent:
- 0:d49f4c0f2ba7
- Child:
- 2:8818d976f1e7
File content as of revision 1:5ffbf2bca1b5:
// This is all set up for the RS Labboard: Just plug a memory stick with a wav file called test.wav on it and have a listen! #include "mbed.h" #include "WavPlayer.h" #include "MSCFileSystem.h" MSCFileSystem msc("msc"); // Mount flash drive under the name "msc" WavPlayer player; int main() { FILE *fp = fopen("/msc/test.wav", "r"); // Open "out.txt" on the local file system for writing player.open(&fp); player.play(); fclose(fp); }