A simple example of WAV playback for the RS AudioCODEC board. Uses a USB drive to stream music.
Dependencies: FatFileSystem MSCFileSystem WavPlayer mbed
Fork of WavPlayer_test by
Diff: main.cpp
- Revision:
- 0:d49f4c0f2ba7
- Child:
- 2:8818d976f1e7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Sep 19 11:03:56 2012 +0000 @@ -0,0 +1,15 @@ +// 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); +}