Problems using javazoom's Player

最后都变了- 提交于 2019-12-11 10:46:30

问题


I'm trying to play mp3-files using the JLayer Class Player. After starting the Thread containing myPlayer.play() you can hear some hundred milliseconds of the beginning of the song and then the player interrupts and I get the following error messages:

> javazoom.jl.decoder.BitstreamException: Bitstream errorcode 102   at
> javazoom.jl.decoder.Bitstream.newBitstreamException(Unknown Source)
>   at javazoom.jl.decoder.Bitstream.readFrame(Unknown Source)  at
> javazoom.jl.player.Player.decodeFrame(Unknown Source)     at
> javazoom.jl.player.Player.play(Unknown Source)    at
> javazoom.jl.player.Player.play(Unknown Source)    at
> controller.PlayController.run(PlayController.java:51)     at
> java.lang.Thread.run(Thread.java:724)

I've searched the internet for solutions and I've read that this error could occur due to problems with certain .mp3-files, but .wav- or .wma-files weren't either accepted. Does anyone know how I can get the player working? Thanks in advance


回答1:


I've gotten some distortion using Javazoom on Linux. a comment above about interrupting the input stream prompted me to keep the Player class instantiated and close the buffered input stream before opening every time, That seemed to help, but I'm not sure. It came back but less often and now goes away if I close Firefox.

Thanks for the insight about the input streams getting interrupted.



来源:https://stackoverflow.com/questions/20150953/problems-using-javazooms-player

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