Java refuses to play sound on my machine
Sorry if I'm posting this in the wrong forum, I couldn't quite figure out which forum is suitable.
I've previously written several apps that included sound, and they all worked well.
Recently I've been working on a new game and encountered some errors trying to play sounds - All functions related to sound don't seem to work.
The problem occurs with all sound files (wav's), and also when using JLayer with mp3 files.
I can't use any of the following methods: (getting different error messages, which I will specify in parenthesis).
AudioSystem.getClip() ("No line matching interface Clip supporting format..")
AudioSystem.getMixerInfo().length (oddly returns 0).
AudioStream.getData() ("could not create AudioData object")
AudioPlayer.player.start(InputStream i) (no error / exception but the sounds simply don't play).
After getting all these exceptions in my new game I retried my previous games and apps and suddenly all of the sounds don't work - no sound whatsoever, Although they all worked perfectly at the time, and I've changed nothing in terms of hardware nor software.
I should note that I am able to use Winamp and Windows Media Player so the sound hardware and drivers are fine.
Can anyone offer assistance and/or explanations?
Thanks in advance,
Geva.
Re: Java refuses to play sound on my machine
Have the sound files moved/permissions changed?
Take a look at Sun's tutorial for audio playback.
Re: Java refuses to play sound on my machine
Quote:
Originally Posted by
helloworld922
Nope, the files haven't been moves and the permissions remained the same.
I already went over Sun's tutorial and it doesn't mention any possible problems, not to mention my specific problem where it doesn't identify any mixer and doesn't play sound. The weirdest part is that it has already worked in the past..