通过 wifi/tcp 的 Java Sound PCM Stream 非常“静态”。
我编写了一个程序,将 PCM 流从我的电脑传输到另一台电脑或我的 Android(使用 AudioTrack)。它使用 java 声音并从立体声混音器获取目标线和源线。从技术上讲,一切都正常(套接字、混音器、线路、流、缓冲区等),但远程扬声器上的输出听起来非常静态。即使没有声音传出,也会有持续的噼啪声。我在手机和电脑上测试了该程序,结果相同。
我能做些什么? 谢谢, Bill
ps 代码相当大,而且有点乱,但如果你要求的话,我可以将其发布到某个地方。
I've written a program that transmits a PCM stream from my pc to another pc or my android(using an AudioTrack). It uses java sound and takes the target and source lines from the Stereo Mix mixer. Everything technically works (sockets, mixers, lines, streams, buffers, etc.) but the output on the remote speakers is very static-y sounding. Even when there isn't sound coming through, there is a constant crackling sound. I've tested the programs on my phone and computer with the same result.
What can I do?
Thanks,
Bill
ps The code is pretty big, and kinda messy, but I can post it somewhere if you ask.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,静态意味着您向音频子系统提供了不正确的数据:根据您的描述,音频路径中可能存在错误,我怀疑您是:
Typically the static means you're feeding incorrect data to the audio subsystem: given what you describe there's probably an error in the audio path, and I'd suspect you are either: