“不支持主增益”在 OpenJDK 中

发布于 2024-08-14 11:37:13 字数 213 浏览 9 评论 0原文

我们在 Linux 中的 OpenJDK 上使用 JavaZoom 库播放音频文件时遇到问题,尽管它在 Sun JDK 上运行得很好。 “主增益”是否有任何解决方法不支持'异常?

莫森

We have problems playing audio files using JavaZoom's libraries on OpenJDK in Linux, although it works perfectly on Sun JDK. Is there any workaround for this 'Master Gain not supported' exception?

Mohsen

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

两相知 2024-08-21 11:37:13

我也注意到了同样的事情。我只是在尝试更改增益之前检查 Sun Java。很糟糕,但从好的方面来看,OpenJDK 的音频性能比 Sun 的要好得多,可以满足我的需求。

编辑:由于其他人会通过网络搜索找到这个答案,我将添加一些内容。在某些情况下,OpenJDK 的 PulseAudioMixer 似乎不遵守 JSAPI。例如,它坚持在刷新()之前先停止()一行。然而 JSAPI 明确表示在停止之前冲洗是合法的。或者在您提到的情况下,脉冲音频实现声称在您调用 isControlSupported 时支持增益,但无论如何都会抛出异常。这是 JavaZoom 代码无法在 OpenJDK 中运行的两个原因。还有其他的。在某些情况下,PulseAudioMixer 并不是罪魁祸首,它只是在未定义的情况下采用不同的路线(例如,如果您在未打开的线路上调用 write() 会发生什么?!)。我正在使我编写的一些代码变得更加健壮,以便它可以在 OpenJDK 上运行。

I've noticed the same thing. I just check for Sun Java before trying to change the gain. Sucks, but on the bright side OpenJDK's audio is performing much better than Sun's for my needs.

EDIT: since others will find this answer through web searches, I'm going to add a bit. OpenJDK's PulseAudioMixer does not appear to adhere to the JSAPI in some cases. For example, it insists that you stop() a line before flush()ing it. JSAPI however specifically says it's legal to flush before stopping. Or in the case you mention, the pulse audio implementation claims to support gain when you call isControlSupported, but then throws an exception anyway. Those are two reasons JavaZoom code won't work in OpenJDK. There are others. In some cases PulseAudioMixer isn't to blame, it just takes a different route in undefined cases (e.g., what happens if you call write() on a line that isn't open?!). I'm in the process of making some code I wrote more robust so it will run on OpenJDK.

谢绝鈎搭 2024-08-21 11:37:13

有一个针对 libbasicplayer-java 的补丁(适用于 3.0-4):

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567856

然而,OpenJDK 的增益支持仍然存在错误:

https://bugs.launchpad.net/zekr/+bug/622663

There is a patch against libbasicplayer-java (applied for 3.0-4):

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=567856

However, OpenJDK is still buggy with its gain support:

https://bugs.launchpad.net/zekr/+bug/622663

九命猫 2024-08-21 11:37:13

在该页面上: https://bugs.launchpad.net /ubuntu/+source/openjdk-6/+bug/491784/ 最后有一个补丁,现在对我有用。该补丁仅由 try & 组成。抓住。
抱歉,我找不到 javazoom 的作者将源代码放在网上的位置。如果您需要的话请联系我。

On that page : https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/491784/ there is a patch at the end, and it works for me now. The patch just consist of try & catch.
Sorry, I can't find anymore where the author of javazoom put the source online. Contact me if you need them.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文