AssetLoadException while loading .wav sound

I am getting below error while loading an ambient music .wav file.
Details of music file are
Name:soft1.wav, length:16 secs, bit rate:3072kbps, size:6.02MB.
I have downloaded this file from http://www.freesound.org/people/Erokia/sounds/178769/
http://www.freesound.org/people/Erokia/sounds/178769/

Apr 30, 2014 2:36:09 AM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.asset.AssetLoadException: An exception has occured while loading asset: Sounds/soft1.wav (Buffer)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:290)
at com.jme3.audio.AudioNode.<init>(AudioNode.java:145)
at com.jme3.audio.AudioNode.<init>(AudioNode.java:157)
at mygame.MusicManager.playMusic(MusicManager.java:13)

My code snippet is:
AudioNode audioSource = new AudioNode(sssetmanager, “Sounds/soft1.wav”, false); //crashes here
audioSource.setVolume(3);
audioSource.setPositional(false);
audioSource.play();

Just to add:

When I converted soft1.wav to soft1.ogg(161KB, 128kbps, 44.1kHz, Stereo), it works fine.

@quartz1 said:

Apr 30, 2014 2:36:09 AM com.jme3.app.Application handleError
SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]
com.jme3.asset.AssetLoadException: An exception has occured while loading asset: Sounds/soft1.wav (Buffer)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:290)
at com.jme3.audio.AudioNode.<init>(AudioNode.java:145)
at com.jme3.audio.AudioNode.<init>(AudioNode.java:157)
at mygame.MusicManager.playMusic(MusicManager.java:13)

Is that all of the stack trace? Usually I’d expect there to be a “Caused by” which has the really useful stuff.

1 Like

Thanks pspeed, I missed “Caused by” . Here it is, I guess now it makes sense.

Caused by: java.io.IOException: WAV Loader only supports PCM wave files
at com.jme3.audio.plugins.WAVLoader.readFormatChunk(WAVLoader.java:75)
at com.jme3.audio.plugins.WAVLoader.load(WAVLoader.java:152)
at com.jme3.audio.plugins.WAVLoader.load(WAVLoader.java:179)
at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:288)

“WAV Loader only supports PCM wave files”

…so that’s the problem. The WAV file you are trying to load is in an unsupported format.