Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Godot 4.3dev4 C#]Weird Performance while playing WAV sounds at Android #90433

Open
Tracked by #76797
sky94520 opened this issue Apr 9, 2024 · 0 comments
Open
Tracked by #76797

Comments

@sky94520
Copy link

sky94520 commented Apr 9, 2024

Tested versions

4.3dev4 C#

System information

Android 10 - Godot 4.3dev4- Compatibility

Issue description

While I played wav sounds at Android, I found an weird issue, I have loaded the sounds by [Export], but if I don't check it has cache, it will result to FPS cliff, you can view the FPS line chart.
The program is play sound randomly. The only thing I did during this process was click the button, and I could see that the frame rate was very unstable.
1712669469783

But if I add ResourceLoader.HasCached, the FPS is stable 59 ~ 60.

    public override void _Ready()
    {
		  GD.Print("Scene Ready");
		  foreach (AudioStream audio in sounds)
		  {
			GD.Print("Audio" + audio.ResourceName + "is loaded:" + ResourceLoader.HasCached(audio.ResourcePath));
		  }
    }

Besides, while I use ogg sounds, it is no the issue, but I found the FPS flow during 59 and 60, I don't know the reason.
I use the online web for converting wav to ogg files: https://www.freeconvert.com/wav-to-ogg/download
image

Steps to reproduce

  1. Create an C# script and add some wav resource to [Export] attributes.
  2. play the above wav randomly.

Minimal reproduction project (MRP)

test_for_ogg.tscn is add ogg resources to [Export] attr.
test_for_wav.tscn is add wav resources to [Export] attr.
TestFMod.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants