sound

i tried putting sound into my game but it will not work. any ideas?

i have something like this.

try{

blastSound= getAudioClip(new URL("fire.au"));

debrisSound= getAudioClip(new URL("debris.au"));

explodeSound = getAudioClip(new URL("explode.au"));

fireSound= getAudioClip(new URL("fire.au"));

passingSound = getAudioClip(new URL("passing.au"));

targetedSound = getAudioClip(new URL("targeted.au"));

}

catch (MalformedURLException e){}

blastSound.play();blastSound.stop();

debrisSound.play();debrisSound.stop();

explodeSound.play(); explodeSound.stop();

fireSound.play();fireSound.stop();

passingSound.play(); passingSound.stop();

targetedSound.play(); targetedSound.stop();

}

[1332 byte] By [stephensk8sa] at [2007-11-27 3:01:03]
# 1

catch (MalformedURLException e) {}

You shouldn't do this.

catch(MalformedURLException e)

{

e.printStackTrace();

}

CaptainMorgan08a at 2007-7-12 3:42:43 > top of Java-index,Other Topics,Java Game Development...
# 2
do i need some sort of volume method. cuz i did that and it still does not work.
stephensk8sa at 2007-7-12 3:42:44 > top of Java-index,Other Topics,Java Game Development...
# 3
when i tell it to run the method in my run() it freezes the program
stephensk8sa at 2007-7-12 3:42:44 > top of Java-index,Other Topics,Java Game Development...
# 4

AudioClip loopClip = getAudioClip(getDocumentBase(), "fire.au");

loopClip.play();

i put this in my init() and this was directly out of an example and it did not work. am i doing something wrong? i hav teh sound file in the same folder as my program. i dont think its my comp because examples on the internet r running

stephensk8sa at 2007-7-12 3:42:44 > top of Java-index,Other Topics,Java Game Development...
# 5

could it possibly just be my computer? examples on the internet run. if i take the example and compile it and rename the audio file to something that is in the folder, it wont work.

if it helps, im using bluej

i also changed an mp3 file to an au file if i havnt already said that. the au file does play in windows media player

stephensk8sa at 2007-7-12 3:42:44 > top of Java-index,Other Topics,Java Game Development...
# 6
i figured out that it just wont support my au file if i make it. i hav to download one off the internet and then it works. so my code was right. does nebody know how to create functionable au files by yourself without downloading it off the internet?
stephensk8sa at 2007-7-12 3:42:44 > top of Java-index,Other Topics,Java Game Development...