使用javazoom的播放器时出现问题 [英] Problems using javazoom's Player

查看:938
本文介绍了使用javazoom的播放器时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用JLayer Class Player播放mp3文件.启动后包含 myPlayer.play() 您可以听到歌曲开头几百毫秒的声音,然后播放器中断,我收到以下错误消息:

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)

我已经在互联网上搜索了解决方案,并且我读到由于某些.mp3-文件的问题而可能发生此错误,但是.wav-或.wma文件都不被接受. 有谁知道我如何让播放器工作?预先感谢

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

推荐答案

我在Linux上使用Javazoom出现了一些失真.上面关于中断输入流的评论促使我在每次打开之前都保持Player类的实例化并关闭缓冲的输入流,这似乎有所帮助,但是我不确定.它回来了,但很少见,现在,如果我关闭Firefox,它就消失了.

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.

这篇关于使用javazoom的播放器时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆