This sample will play a ".wav" file of the USB root folder. Only RIFF format, 48kHz, 16bit, 2ch.

Dependencies:   USBHostDac USBHost_custom_Addiso

Fork of USBHostDac_example by GR-PEACH_producer_meeting

Isochronous transfer sample for GR-PEACH. This sample will play a ".wav" file of the USB root folder. Only RIFF format, 48kHz, 16bit, 2ch.

/media/uploads/dkato/usbdacsample.png
The default setting of serial communication (baud rate etc.) in mbed is shown the following link.
Please refer to the link and change the settings of your PC terminal software.
The default value of baud rate in mbed is 9600, and this application uses baud rate 9600.
https://developer.mbed.org/teams/Renesas/wiki/GR-PEACH-Getting-Started#install-the-usb-serial-communication

Revision:
4:c7cba8933302
Parent:
3:ed025cdb164d
diff -r ed025cdb164d -r c7cba8933302 main.cpp
--- a/main.cpp	Fri Jun 26 08:05:15 2015 +0000
+++ b/main.cpp	Fri Apr 21 21:22:51 2017 +0900
@@ -1,5 +1,6 @@
 #include "mbed.h"
 #include "USBHostDac.h"
+#include "FATFileSystem.h"
 #include "USBHostMSD.h"
 #include "dec_wav.h"
 
@@ -39,7 +40,8 @@
     usb1en = 0;        //Outputs low level
 #endif
 
-    USBHostMSD msd("usb");
+    FATFileSystem fs("usb");
+    USBHostMSD msd;
     USBHostDac usbdac;
 
     while(1) {
@@ -47,6 +49,7 @@
         while(!msd.connect()) {
             Thread::wait(500);
         }
+        fs.mount(&msd);
 
         // in a loop, append a file
         // if the device is disconnected, we try to connect it again