In this waveplayer, the wave file will be keep looping after the waiting time. For the wave file, my format is 11khz 8bit mono. You might need to have a op-amp across the mbed and speaker as the signal will be very small

Dependencies:   mbed wave_player

Revision:
0:e0d156143789
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Nov 22 08:12:12 2011 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "wave_player.h"
+
+LocalFileSystem local("loc");
+AnalogOut       DACout(p18);
+wave_player     waver(&DACout);
+
+int main() {
+    FILE  *fp = fopen("/loc/Hello.wav", "r");
+    while (1)
+    {
+      waver.play(fp);
+      fseek(fp, 0, SEEK_SET);  // set file poiter to beginning
+      wait(3.0);
+      printf("File Playing\n");
+    }
+    fclose(fp);
+} 
\ No newline at end of file