How to send audio stream via UDP in java?

两盒软妹~` 提交于 2019-12-04 14:29:21

You don't what the Player class here, you want to use the classes in javax.sound.sampled. As far as I can tell Player is for playing a sound, not accessing its contents.

I have not tested this, but try using .read on the TargetDataLine you are creating to fill a buffer, and then sending the buffer to the other host.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!