我正在尝试做一个简单的 mp3 播放器,一切都很完美,只是我有一个问题,我不能(播放)流媒体广播 mp3,我在按钮“播放”时收到此消息:
Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo, LittleEndian,
Signed, 16000.0 frame rate, FrameSize=32768 bits
Failed to realize: com.sun.media.PlaybackEngine@c88f97
Error: Unable to realize com.sun.media.PlaybackEngine@c88f97
这是我的代码:
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {
String radiourl = direccionurl.getText();
URL url;
try {
url = new URL(radiourl);
openFile(url);
} catch (MalformedURLException ex) {
Logger.getLogger(VentanaInicio.class.getName()).log(Level.SEVERE, null, ex);
}
p.start();
}
public void openFile(URL url){
try{
p = Manager.createPlayer(url);
p.start();
}catch (Exception o){
o.printStackTrace();
}
}