I\'m in a very early stage of writing a small music/rhythm game in Java (via Slick framework, which in turns uses OpenAL, but that\'s probably irrelevant here). The game needs t
One thing that needs to be recognized about WAV files are, is that it is a container format -- it can hold data in many different formats, including uncompressed PCM to MP3.
In this case, I am going to guess that the library that is being used is hooking into the Java Sound API, and the implementation of the API does not support the format of the data contained in the WAV
file, leading to an UnsupportedAudioFileException exception.
The files can be played back just fine in Winamp or Foobar2000, so this means Java just don't recognize some variants of the file format.
The reason why Winamp and other programs can playback the WAV
file is because it is probably using the Windows Audio Compression Manager or (if I understand correctly) DirectShow, which is used to manage different types of audio codecs.
Winamp itself does not need to know how to decode the audio data inside the WAV
file; it asks ACM or DirectShow to return the raw audio data on which it can handle. (Or also possibly, the data is directly send to the audio output.)
What are my options at this point?
An alternative does seem to exist in the form of the Java Media Framework, which appears to have support many multimedia formats.
It says that it will hook into the Windows ACM when using the "JMF 2.1.1 Windows Performance Pack", so it might be able to playback the WAV
files which can't be played back by the Java Sound API.