-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
No "Finished" signal with looped audio #30737
Comments
They should totally emit a signal, but I think it should be a different one to avoid any compatibility break, something like |
For fun, I decided to guess on how to implement this feature Background: Godot implements scripting and audio on different threads. To avoid avoiding mixing on the main thread, The Problem: Proposal: Implement play() flag setting in reverse.
godot/scene/audio/audio_stream_player.cpp Line 150 in 17732fe
Like play, this loop will only emit signals in between frames like the rest of the engine. |
Somewhat related discussion: #33579. |
Closing in favor of the proposal: godotengine/godot-proposals#1641 |
Using 3.1.1
Audio that is set to loop does not send a "finished" signal when it restarts.
To get around this, I disabled loop, and loop through code (on the finished signal, play)
That is almost good enough, but I have found:
Manually looping like this causes the audio to have a slight delay before it restarts, so the looping audio is not seamless.
When set to automatically loop, there is no (observable) delay. However as I said, with automatic loop set I can't get the finished signal.
The text was updated successfully, but these errors were encountered: