Sound FX are showing as empty in Godot Project

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Cobra!
:warning: Old Version Published before Godot 3 was released.

I’m trying to add sound effects into my game, but this time, instead of importing them, I’m just dragging and dropping the wav files into the project folders.

However, when I added them to a sample player list, they all appeared as empty, the lengths were shown as zero and the wavelength previews were blank, and not to mention that no sound effects played. The same files work just fine in VLC and Audacity.

I tried importing the files using the import option, but I got the same result…

Here are the SFX I’m trying to use: Pistol

What do I do? I’m using fixnum’s Jan 2nd 2.2 Build of Godot, if that helps.

:bust_in_silhouette: Reply From: YeOldeDM

For whatever reason, your sounds are being added to the playlist as Mono, but they are Stereo samples.
I tried opening the sample in Audacity and re-exporting the .wav (without making any changes at all), and now it will load up in Godot as a stereo sample that works.

I just tried that, and the problem persists for me…

Cobra! | 2017-02-07 21:47

Audio will be reworked in 3.0, maybe it will have less issues

Zylann | 2017-02-08 00:01

I did some tests:

First, your sounds are stereo, but imported as mono, as found by YeOldeDM.

Second, they all have different sample rates: 96KHz, 48KHz and 44.1KHz.

I tried importing the first one, but it didn’t work due to the following error:
ERROR: ResourceFormatLoaderWAV::load: Format not supported for WAVE file (not PCM). Save WAVE files as uncompressed PCM instead.

However, I tried to change it to 44.1KHz, normalize it and export it in PCM WAVE, restart Godot… and still can’t import it so I believe there is a bug.

Zylann | 2017-02-08 00:13

Okay, how do I fix the problem with them being imported as mono? I would rather drag and drop the files than using the import tool, because if I did that, the files will be encrypted, which I don’t want, I want to keep my game open for modding.

Cobra! | 2017-02-08 12:30

I have no idea what’s going on with your sounds, I could not import the first one in any way. I created an issue here: Sound import error · Issue #7755 · godotengine/godot · GitHub

Zylann | 2017-02-08 16:11

Okay, thanks for the github issue post.

Cobra! | 2017-02-08 19:07

Is there anything I can do in the meantime? I need to have some sound effects in my game.

Cobra! | 2017-02-10 19:58

I don’t know, you could try other sounds?

This is just incredible that Godot fails to import one sound, even after closing Godot, re-export the sound under different names under a standard format, clear the project cache and restart Godot, it still doesn’t want to import the sound. Same stupid errors are logged in the console, like “WAVE sound is not PCM” (but it IS pcm, I just reexported it from Audacity ^^").

This is megaweird because I am able to have sounds in my game without any problem :open_mouth:
I really hope someone finds what’s going on because I’m clueless.

Zylann | 2017-02-10 23:19

However, the good news is, copying the WAV file (the reexported one) directly in the project seems to work. yay!
But it doesn’t explain why importing it as WAV or OGG is not working…

Zylann | 2017-02-10 23:31

I figured it out (with some help), it was because the wavs were 32-bit, and Godot only seemed to support 16-bit wavs, so I reimported them as such, and they worked!

Cobra! | 2017-02-12 15:46

Good catch! What’s even the point of importing if you have to do that manually xD

Zylann | 2017-02-12 16:01

:bust_in_silhouette: Reply From: Cobra!

It turns out that the problem was the fact that the wavs were 32-bit exports, I re-exported them as 16-bit ones, and those worked!

:bust_in_silhouette: Reply From: scrubswithnosleeves

For future readers:

I also just had a very similar problem, and switching to 32 bit was essential, but Godot was also changing the “Loop Mode” to “Forward” which was also part of the problem. resetting back to default param + 32>16bit fixed it for me!