AudioPlayer AP = AudioPlayer.player;
AudioStream AS;
AudioData AD;
sun.audio.ContinuousAudioDataStream loop = null;
try{
AS = new AudioStream( new FileInputStream("all_shook_up.wav"));
AD = AS.getData();
loop = new sun.audio.ContinuousAudioDataStream(AD);
}catch(IOException error){}
AP.start(loop);
This code doesn't seem to play the .wav file. No sound is played. What am I doing wrong? (I am aware that I could have declared and initialized my variables on the same line, but the separation has been done for clarity)
Aucun commentaire:
Enregistrer un commentaire