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

Add a signal to AudioStreamPlayer that indicates that the loop has started again #1641

Open
vetu11 opened this issue Oct 9, 2020 · 2 comments · May be fixed by godotengine/godot#71088
Open

Comments

@vetu11
Copy link

vetu11 commented Oct 9, 2020

Describe the project you are working on:
Projects with a dynamic music system.

Describe the problem or limitation you are having in your project:
There's no easy way to trigger actions when an AudioStream loops.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Another signal should be added to the AudioStream indicating that it has finished the loop and it has started again.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
It's just another signal.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
It can currently be worked around by setting the Stream to not loop automatically and playing the stream again when the finished signal is emitted.

Is there a reason why this should be core and not an add-on in the asset library?:
AudioStreamPlayer is a core feature.

Related issues:
godotengine/godot#30737
godotengine/godot#33579

@andrewharn
Copy link

Is there any chance of this being added in the future? It would be so useful for me.

@Calinou
Copy link
Member

Calinou commented Jan 5, 2023

Is there any chance of this being added in the future? It would be so useful for me.

To my knowledge, nobody has started working on this feature yet. A pull request would likely be merged if the implementation is sound (no pun intended), given this proposal is fairly self-contained and has garnered community support.

AnimationPlayer likely warrants a similar signal for looped animations too.

vaartis added a commit to vaartis/godot that referenced this issue Jan 8, 2023
Track the number of loops on the player and if it changes, emit a
singal

Closes godotengine/godot-proposals#1641
vaartis added a commit to vaartis/godot that referenced this issue Jan 8, 2023
Track the number of loops on the player and if it changes, emit a
singal

Closes godotengine/godot-proposals#1641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants