ok put into USB device mode attach headset to analog out use control panel to set MBED as default output adjtst speaker volume to get sound play music
Fork of USBAUDIO_speaker by
Revision 7:ba4f65ce69f2, committed 2012-03-19
- Comitter:
- samux
- Date:
- Mon Mar 19 08:23:02 2012 +0000
- Parent:
- 6:c44d017f93de
- Child:
- 8:048f7a1b28eb
- Commit message:
Changed in this revision
USBDevice.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/USBDevice.lib Wed Nov 30 16:20:38 2011 +0000 +++ b/USBDevice.lib Mon Mar 19 08:23:02 2012 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/samux/code/USBDevice/#65a34d6b5e22 +http://mbed.org/users/samux/code/USBDevice/#98311370c1eb
--- a/main.cpp Wed Nov 30 16:20:38 2011 +0000 +++ b/main.cpp Mon Mar 19 08:23:02 2012 +0000 @@ -12,8 +12,8 @@ // length of an audio packet: each ms, we receive 48 * 16bits ->48 * 2 bytes. as there is one channel, the length will be 48 * 2 * 1 #define AUDIO_LENGTH_PACKET 48 * 2 * 1 -// USBAudio -USBAudio audio(FREQ, NB_CHA, 0x7180, 0x7500); +// USBAudio (we just use audio packets received, we don't send audio packets to the computer in this example) +USBAudio audio(FREQ, NB_CHA, 8000, 1, 0x7180, 0x7500); // speaker connected to the AnalogOut output. The audio stream received over USb will be sent to the speaker AnalogOut speaker(p18);