After moving my project to Godot 4.4, almost all the sound effects that I play dynamically stopped working

Godot Version

v4.4.stable.mono.official [4c311cbee]

Question

After moving my project over to 4.4, I’ve noticed that only sounds that are loaded in inside the editor will play. (aka AudioPlayer nodes where I picked the specific stream it should play inside the editor, rather than load them during runtime)
So for example, this no longer plays any audio, but produces no exceptions or error messages, indicating that it should still work like before.

public void PlayFootstepSound()
{
    AudioStreamPlayer snd = GetNode<AudioStreamPlayer>("aud_Footstep");

    if (_footstepSounds.Length == 0)
    {
        Log.Error("Footstep sounds cannot be empty in {class}",
            nameof(PlayerSounds));
        return;
    }

    PlaySound(snd, _footstepSounds);
}

private void PlaySound(AudioStreamPlayer snd, AudioStream[] selection)
{
    AudioStream randomStream = NodeHelpers.PickRandomElement(selection);
    snd.Stream = randomStream;

    PlaySound(snd);
}

private void PlaySound(AudioStreamPlayer snd)
{
    snd.PitchScale = AudioHelpers.GetRandomPitch(0.9f, 1.1f);
    snd.Play();
}

I stepped through the code and nothing was null, everything got selected properly.

I cannot re-create this, but I went back to a previous commit before moving to 4.4 and used 4.3 again, and ALL the sound effects still worked perfectly there. So something in 4.4 broke dynamically loaded / playing audio.

It’s becoming increasingly more and more annoying that with each new update after Godot 4, it seems like the engine is getting more and more regressions, and it seems like adding new features for the sake of it is starting to affect how stable the whole thing is.

1 Like

I understand your frustration, but do you really believe they are adding new features to Godot “for the sake of it”? Most, if not all features added are solutions to existing problems.

With that said, did you face these issues with the 4.4 beta builds?

Given that I want a stable engine, I do not use the beta builds for my game that’s already in production.
But yes, lately I’ve ran into several issues that were not present before, and even posted two issue reports before to GitHub, but it’s the issues that only show up in larger projects that are the problem.
Since those are really difficult to replicate with a MRP.

Hi @tibaverus , next time try to delete the .godot folder to force Godot to regenerate all cache files and metadata, which may solve migration issues between engine versions. This trick helped me in some occasions. :slight_smile:

This was already tried and did absolutely nothing. After the migration was finished, I removed my local files completely and cloned the project again from our development branch, so that I can avoid any weird issues like this.

I cloned the entire repo from the last commit we did just before upgrading to 4.4, and all the sound effects work perfectly fine.
I can 100% confirm this is an issue in Godot 4.4 and NOT in our project. The very last commit after that was simply running the tool that supposedly moved our project from 4.3 to 4.4, and after doing so, the sounds broke.

1 Like

Had the same issue, for me that was because I used a SubViewport, and apparently now you gotta enable audio in its properties as mentionned here

The forum post you linked is from 2021, so “now you have to do this” isn’t applicable, as I did not upgrade from a Godot version from before 2021.

I do not use SubViewports in my game, so this isn’t a solution for me unfortunately.