java - Second audio clip does not play. -


Well, in particular, why this code does not want to play another audio file here:

 < Code> public static zero main (string [] args) {// runs the first file for a few seconds playmax (new file ("C: \\ sample.wav")); Wait (5.0); System.out.print ("..."); // The second file that does not want to play: playMusic (new file ("C: \\ sample2.wav")); } Public static zero playmax (file stream) {AudioInputStream AIS = AudioSystem.getAudioInputStream (stream); Clip music = audio system .getclip (); Music.open (AIS); Music.start (); }   

I think I have to dismiss some or the other (like music.close (), AIS.close ()), but there is no effect in these particular examples. Any ideas?

Is it possible that your app will expire before your audio clips end? You can find this assistant.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -