0 votes

I'm having a problem with sounds, I'm trying to play some sounds using the animation player call func tracks, and for some reason, on my project, some sounds aren't playing, but when I try the same thing on an empty project, all of the sounds play fine...

I've tried importing the sounds multiple times and even just dragging and dropping the original wavs and just using them, but the problem persists.

It can't be blocked by any code in my project, because I'm not using any scripts in the scenes where I'm playing the sounds that don't work, I'm just calling the native methods of the SamplePlayer through the AnimationPlayer Call Func tracks.

AnimationPlayer calling the play func of SamplePlayer
The sound files being used

I don't know what the possible cause could be, I might even need to have someone look at the project themselves, since I can't reproduce this problem.

Does anyone have any idea what I might be doing wrong?

If it helps, here are the sound effects not working for me in this project:
The "GSthunder" sound effect
The "UI Scroll" sound effect (Not visible in screenshot but is in the same folder)
The "introdoors" sound effect

in Engine by (171 points)

Are you playing two sounds at a time on the same SamplePlayer? If you do, then check its polyphony, it's possible that one sound is stealing the other's voice because polyphony is too low.

I'm not, no.

I fixed the prolem with 2 of the sounds, but the one I still have an issue with ("UI Scroll") is just importing as blank and refuses to play if I just manually transfer the file to the project folder...

Maybe your sample library got corrupted in some way, try making a new one.

For posterity: I had issues importing .WAV files, and found that dropping their quality from 32 to 16 bit fixed my issue. Obviously this isn't an option in instances that require high quality sounds, but it's something to try.

1 Answer

0 votes

I disabled the compression parameter from the import, because sometimes it tends to ruin sounds for some reason.

The GSThunder sound imports fine.

The GUI scroll sound somehow has a format that is not supported by Godot. When I open it in Audacity and re-export it, Godot is able to read it.
However, its sample rate is 192000 Hz instead of 44100 Hz, so when it gets imported it plays at a lower pitch.

The introdoors effect appears to import correctly, but when played I just hear half a second of white noise. Reexporting doesn't fix it.
I noticed the sound had a lot of saturation, so I normalized it and reexported again...
and Godot got stuck in an import loop with this error in the console:

ERROR: EditorNode::_sources_changed: Condition ' rimd.is_null() ' is true. Continuing..: At: tools\editor\editor_node.cpp:460

Looks awkwardly broken, but once the editor is restarted, the sound is there and plays correctly.

Looks like the audio import in Godot has a lot of progress to make... failing at importing WAV files is a bit lame :'D
This should be mentionned on Github with the files as an example.

by (29,042 points)
edited by
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.