PlayN Sound:请求的缓冲区太大
我正在尝试在 PlayN 中播放声音。
Sound soundtrack = assetManager().getSound("sounds/soundtrack");
但得到这个
无法打开声音sounds/soundtrack.mp3
javax.sound.sampled.LineUnavailableException:无法分配剪辑数据:请求的缓冲区太大。
该怎么办?
这是一个 mp3,时长 6 分 02 秒。 1.09Mb
有效负载大小:1087776 字节
标头位于:2264 字节
编码延迟:576,零填充:824
时长:362秒
MPEG-2.5 第 3 层
24 kbps,5036 帧
8000 Hz 联合立体声
I'm trying to play a sound in PlayN.
Sound soundtrack = assetManager().getSound("sounds/soundtrack");
But get this
Failed to open sound sounds/soundtrack.mp3
javax.sound.sampled.LineUnavailableException: Failed to allocate clip data: Requested buffer too large.
What to do?
It's an mp3, 6:02 minutes long. 1.09Mb
Payload Size: 1087776 bytes
Header found at: 2264 bytes
Enc Delay: 576, Zero Padding: 824
Length: 362 seconds
MPEG-2.5 layer 3
24 kbps, 5036 frames
8000 Hz Joint Stereo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,文件大小限制(这就是您所遇到的)是声音在 Java 后端实现方式的限制。好消息是 HTML 后端应该可以正常播放音频,只是在使用 JRE 本地测试应用程序时您将听不到它。
As far as I can tell the file size limitation (which is what you are hitting) is a limitation of the way that sound is implemented on the Java backend. The good news is that the HTML backend should play the audio fine, you just won't be able to hear it when testing the application locally using the JRE.