如果我在关闭并停止 TargetDataLine 后尝试使用另一个音频输入设备再次打开它,那么它只会产生噪音而不是信号。为什么?
这是我正在谈论的代码:https://gist.github.com/flextexmex/e2fad97b7e1af93d6c98
最佳答案
这可能不相关,但有一个关于 TargetDataLine 的常见问题解答。 http://www.jsresources.org/faq_audio.html#multiple_tdl
Why is in not possible to open more than one TargetDataLine at the same time? Well, because it's a bug. The above is true for the Sun JDK up to version >1.4.2 on Solaris and Windows, and up to 1.4.1 on Linux. Beginning with version >1.5.0 for Solaris and Windows and version 1.4.2 for Linux there are the new >"Direct Audio Device" mixer that don't have this limitation.
更新到 1.50 是否解决了您的问题?
关于java - 为什么无法重新打开 TargetDataLine?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26829443/