0 votes

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...

enter image description here

Here are the SFX I'm trying to use: http://www.mediafire.com/file/w2a5ln4b52ul1y2/Pistol.zip

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

in Engine by (171 points)

3 Answers

+2 votes
Best answer

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!

by (171 points)
0 votes

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.

by (1,328 points)

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

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 :O
I really hope someone finds what's going on because I'm clueless.

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...

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!

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

0 votes

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!

by (604 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.