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

AudioStreamPlayer intermittently causes Process Time to spike during a single frame #84157

Open
Tracked by #76797
zilphy opened this issue Oct 29, 2023 · 1 comment
Open
Tracked by #76797

Comments

@zilphy
Copy link

zilphy commented Oct 29, 2023

Godot version

v4.1.2.stable.official [399c9dc]

System information

Godot v4.1.2.stable - Windows 10.0.22621 - Vulkan (Compatibility) - NVIDIA GeForce RTX 3080 (NVIDIA; 31.0.15.3699) - 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz (16 Threads)

Issue description

AudioStreamPlayer intermittently causes a huge lag spike when playing music or other longer audio files after the scene is first loaded. There is a large increase in Process Time in the profiler as shown below. Usually this occurs between 20 - 30 seconds after the scene is loaded and only occurs once, if it does occur. The scene only contains a Node2D with an AudioStreamPlayer attached.

image

Steps to reproduce

  1. Create new project
  2. Create an AudioStreamPlayer Node
  3. Set a longer audio file to the stream
  4. Set the AudioStreamPlayer to Autoplay
  5. Run the project and monitor the profiler
  6. Wait 30 seconds at least for a process time spike
  7. If the spike does not occur, repeat steps 5 - 6 until the spike is seen.

Minimal reproduction project

audio_bug.zip

@zilphy
Copy link
Author

zilphy commented Oct 29, 2023

My apologies, this issue might be just with my PC. I updated/reinstalled my graphics drivers to the latest driver and the issue became much more manageable. The spike still occurs, but it's only 60ms instead of >1000ms, which doesn't break my project anymore.

Additionally I was still able to detect a spike even when I removed the AudioStreamPlayer from the scene in the project. So it might not be related to the AudioStreamPlayer at all in the end.

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