![](/media/cache/profiles/7810ccd41bf26faaa2c4e1f20db70a71.50x50_q85.png)
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-24
- Revision:
- 2:8818d976f1e7
- Parent:
- 0:d49f4c0f2ba7
File content as of revision 2:8818d976f1e7:
// This is all set up for the RS Labboard: Just plug a memory stick with a wav file called test.wav on it //(such as the one you can get from: https://mbed.org/media/uploads/p07gbar/test.wav) and have a listen! // Any 16bit PCM Wav files with channel*sample rate less than 48kHz should work. #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); }