Play a wav clip in the headphones (or a speaker)

Dependencies:   mbed

Revision:
1:91104d67b0af
Parent:
0:17458f91a0e9
diff -r 17458f91a0e9 -r 91104d67b0af talking.cpp
--- a/talking.cpp	Sun Feb 05 09:52:10 2017 +0000
+++ b/talking.cpp	Sat Feb 11 14:19:31 2017 +0000
@@ -21,7 +21,7 @@
 enum { MaxWavValue = 255 };
 
 static const float ticker_rhythm = 13E-5;  // 8 kHz sample rate (1/8000 sec delay)
-static const char clip_path[] = "/local/blonde.wav";
+static const char clip_path[] = "/local/blonde8k.wav";
 
 
 bool done = false;
@@ -34,7 +34,7 @@
 
 int main () 
 {
-    const int size = 30000;   // 32K max in total (~30K is enough for testing)
+    const int size = 27033;   // 32K max in total (~30K is enough for testing)
     char clip[size];
     
     waitForButton(led, button);