I have been through I am in the very early stages of writing a little music / rhythm game in Java (select Framework, which turns Uses OpenLock, but this is probably irrelevant here). Need to play WAV format read many sound files (and playback), but some files are throwing [javax.sound.sampled.UnsupportedAudioFileException] exception.
on org.newdawn on javax.sound.sampled.AudioSystem.getAudioInputStream (AudioSystem.java:1102) on org.newdawn.slick.openal.WaveData.create (WaveData.java:123) .slick.openal.SoundStore.getWAV (SoundStore.java:713) org.newdawn.slick.openal.SoundStore.getWAV (SoundStore.java:683) is org.newdawn.slick.Sound & the lt ;. Init & gt; (Sound. Java: 33)
The files can be played in Winamp or Foobar2000 properly, so it means that Java just does not recognize some forms of file formats. What are my options at this point?
Note: The files in question are given by the user, so I can not convert them already (something like apathy). Any conversion should be done at runtime.
The file needs to be identified, it is a container format - There may be data in different formats, which includes.
In this case, I'm guessing that is being used in the library's hook, and API implementation format does not support the WAV
file Inherent data, leading to an exception.
Files can be played back in Winamp or Foobar2000, so it means Java just do not recognize some variants of file format.
The reason is that Winamp and other programs can playback the "WAV file, because it is probably using Windows or (if I understand correctly ), Which is used for various types of management.
Winamp does not need to decode audio data inside the WAV
file itself; It tells the ACM or DirectShow to return raw audio data on which it can handle. (Or, possibly, the data is sent straight to the audio output.)
What are my options at this point?
appears to be present in the form of an option, which appears.
It says that while using "JMF" it can be able to playback Windows ACM 2.1.1 Windows Display Pack ", hence it WAV
files Java sound can not be played by API.
Comments
Post a Comment