Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\user>a:
A:\>javac G.java
A:\>java G Exception in thread "main" java.io.FileNotFoundException: Confused.au (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown Source) at java.io.FileInputStream.<init>(Unknown Source) at G.main(G.java:12)
A:\>
Only it would have been better if I had the Confused.au file
you stop it (almost) at the same time you start it
AudioPlayer.player.start (as); // Similarly, to stop the audio. AudioPlayer.player.stop (as);
try adding a thread sleep, see if the sound plays now AudioPlayer.player.start (as); // Similarly, to stop the audio. try{Thread.sleep(2000);}catch(Exception e){}//<------- AudioPlayer.player.stop (as);
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop