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.
Dependencies: FatFileSystem MSCFileSystem WavPlayer mbed
main.cpp
00001 // This is all set up for the RS Labboard: Just plug a memory stick with a wav file called test.wav on it 00002 //(such as the one you can get from: https://mbed.org/media/uploads/p07gbar/test.wav) and have a listen! 00003 // Any 16bit PCM Wav files with channel*sample rate less than 48kHz should work. 00004 00005 #include "mbed.h" 00006 #include "WavPlayer.h" 00007 #include "MSCFileSystem.h" 00008 00009 MSCFileSystem msc("msc"); // Mount flash drive under the name "msc" 00010 WavPlayer player; 00011 00012 int main() { 00013 FILE *fp = fopen("/msc/test.wav", "r"); // Open "out.txt" on the local file system for writing 00014 player.open(&fp); 00015 player.play(); 00016 fclose(fp); 00017 }
Generated on Fri Jul 15 2022 19:31:29 by
1.7.2