Re: Why can't I play sounds?
Try rewriting the code to be an applet and see if when executed as an applet it plays a sound.
Re: Why can't I play sounds?
Quote:
Originally Posted by
Norm
Try rewriting the code to be an applet and see if when executed as an applet it plays a sound.
how do I do that? I am an absolute beginner to GUI. Can you please provide me with an easy tutorial!
Re: Why can't I play sounds?
Re: Why can't I play sounds?
Quote:
Originally Posted by
sakonpure6
I am making a simple game and I want to play sounds this is what I have, but it is not working!
I have not tested your code and at this moment I have no time for this. But I can tell you a thing that is worth to know: the .wav file format is a quite complex format with many possible bitrates and codecs/compressions. It's very possible that your sound file format is one of those not supported by the Java framework.
See WAV - Wikipedia, the free encyclopedia, you'll find a list of some formats with samples. Try these samples to verify if it's your code that is wrong or your sound file.