On Thu, Mar 17, 2016 at 9:57 AM,  <[email protected]> wrote:
>          I would like to write a c code which will play audio like wav or
> mp3 from USB audio adapter when it receives a TCP command from Ethernet
> interface. To do this I will use a cheap USB Audio Adapter and Beagle Bone
> Black. Can anybody help me to write the code from scratch ?

A supported USB sound card would show up as /dev/audio and you can
either directly copy data to it, or use the command 'play'.
To trigger this by a TCP command, you could do something like this:

while (netcat -l 8080) ; do play sound.wav; done

will loop, waiting for connection to port 8080, and play the sound wav
file when the connection closes.
You can test this on your desktop by connecting to localhost
netcat localhost 8080
^D

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to