I wrote a media player, that I exported as a jar file.
It works great on my linux system. Compiled with 1.8, but to work with 1.6 as well.
Now my friend who needs to use it runs the jar on her mac (java 1.6) and the program works, does not throw an exception, but does not play sound.
Any ideas what could have gone wrong?
public void mediaPlayer()
throws Exception {
// open the sound file as a Java input stream
String soundFile = "./data/1.wav";
InputStream in = new FileInputStream(soundFile);
//
// // create an audiostream from the inputstream
AudioStream audioStream = new AudioStream(in);
// // play the audio clip with the audioplayer class
AudioPlayer.player.start(audioStream);
}
Aucun commentaire:
Enregistrer un commentaire