Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to play audio recieved via UDP

843802Jan 31 2010 — edited Feb 1 2010
Hello,

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..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2010
Added on Jan 31 2010
2 comments
593 views