java 处理音频的问题
出现的问题:
Error: Unable to prefetch com.sun.media.content.audio.midi.Handler$MidiController@b8df17
请问这是怎么回事?
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
import javax.swing.*;
import javax.media.*;
public class JVideoDemo extends JFrame implements ControllerListener
{
JPanel contentPane;
Component cc=null;
Component vc=null;
BorderLayout borderlayout=new BorderLayout();
Player player=null;
CaptureDeviceInfo infor;
MediaLocator mediaLocator;
public JVideoDemo(String mediaURL)
{
try{
player=Manager.createPlayer(new MediaLocator(mediaURL));
Manager.setHint(Manager.LIGHTWEIGHT_RENDERER,new Boolean(true));
}catch(Exception ex)
{
ex.printStackTrace();
}
if(player==null)
System.out.println( "media is not exists ");
player.addControllerListener(this);
player.prefetch();
}
public void controllerUpdate(ControllerEvent e)
{
if(e instanceof ControllerClosedEvent)
System.exit(0);
if(e instanceof EndOfMediaEvent)
{
player.setMediaTime(new Time(0));
player.start();
return;
}
if(e instanceof PrefetchCompleteEvent)