USB Speak with Digital Volume Control
Dependencies: AD5206 USBDevice mbed
Fork of USBAUDIO_speaker by
Diff: main.cpp
- Revision:
- 7:ba4f65ce69f2
- Parent:
- 6:c44d017f93de
- Child:
- 10:352d3dbfd6ec
diff -r c44d017f93de -r ba4f65ce69f2 main.cpp --- 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);