使用JavaZOOM BasicPlayer类播放某些MP3时出错 [英] Error while playing some MP3s using JavaZOOM BasicPlayer classes

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

问题描述

这是堆栈跟踪:

java.io.IOException: Resetting to invalid mark
    at java.io.BufferedInputStream.reset(BufferedInputStream.java:433)
    at org.tritonus.share.sampled.file.TAudioFileReader.getAudioInputStream(TAudioFileReader.java:324)
    at javazoom.spi.mpeg.sampled.file.MpegAudioFileReader.getAudioInputStream(Unknown Source)
    at javazoom.spi.mpeg.sampled.file.MpegAudioFileReader.getAudioInputStream(Unknown Source)
    at javax.sound.sampled.AudioSystem.getAudioInputStream(AudioSystem.java:1179)
    at javazoom.jlgui.basicplayer.BasicPlayer.initAudioInputStream(Unknown Source)
    at javazoom.jlgui.basicplayer.BasicPlayer.initAudioInputStream(Unknown Source)
    at javazoom.jlgui.basicplayer.BasicPlayer.open(Unknown Source)
    at BasicPlayerDemo.play(BasicPlayerDemo.java:49)
    at BasicPlayerDemo.main(BasicPlayerDemo.java:24)

似乎其他人也有此问题:

Seems that other people are also having this problem:

  • Jukebox: no sound?
  • Stack trace on player state update

任何原因吗?我正在尝试使用JavaZoom类制作一个简单的Java Swing音乐播放器.

Any reason for this? I am trying to make a simple Java Swing music player using JavaZoom classes.

推荐答案

在(

There is a solution for this problem at (pelzkuh.de blog) It is in German but mainly says that the cause is an outdated library mp3spi1.9.4.jar. You have to replace it with the new one mp3spi1.9.5.jar. Links are provided in the pelzkuh blog entry.

这篇关于使用JavaZOOM BasicPlayer类播放某些MP3时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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