How to play audio recieved via UDP
843802Jan 31 2010 — edited Feb 1 2010Hello,
Im working on an application where I have to stream live realtime audio over a bad wireless connection, and then play it from the recieving computer.
I don't have much network programming experience, only a few TCP examples.
The audio is low quality 8bit, 11khz. mono.
Since it's more important for me to keep it realtime, than to be sure to get all audio I think UDP is the option?
I can play an byte array of raw audio data through an AudioInputStream, SourceDataLine but my question is:
How do i get all the byte arrays, that I recieve in the UDP datagram packages into a continues InputStream that I can give to my AudioInputStream?
Hope someone can point me in the right direction... Or let me know if UDP is the wrong way to go..