i'm trying to learn Java media frame. I tried to write a audio
player that dosn't seem to work. Can anybody recommend a online JMF
tutorial besides what is on java.sun's website. i want to write a
program that caputures video from mutilple firewire cameras. could
somebody recommend a book or tutorial that would be helpful.
this is the sample code i wrote for a media player that will not work
import javax.media.*;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.net.MalformedURLException;
public class SimpleAudioPlayer {
private Player audioPlayer = null;
public SimpleAudioPlayer(URL url) throws IOException,
NoPlayerException,
CannotRealizeException {
audioPlayer = Manager.createRealizedPlayer(url);
}
public SimpleAudioPlayer(File file) throws IOException,
NoPlayerException,
CannotRealizeException {
this(file.toURL());
}
public void play() {
audioPlayer.start();
System.out.println("playing");}
public void stop() {
audioPlayer.stop();
audioPlayer.close();
}
public static void main(String args[]) throws IOException,
NoPlayerException,
CannotRealizeException{
File audioFile = new File(args[0]);
SimpleAudioPlayer player = new SimpleAudioPlayer(audioFile);
player.play();
player.stop();
}
}
i run it after i compile it buy using this command but i don't hear
any files playing.
java SimpleAudioPlayer SOUND43.WAV