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 does not emit signal "finished" when using AudioStreamPolyphonic #75089

Open
Tracked by #76797
cheesymoo opened this issue Mar 19, 2023 · 2 comments
Open
Tracked by #76797

Comments

@cheesymoo
Copy link

cheesymoo commented Mar 19, 2023

Godot version

4.0.stable.official

System information

MacOS 10.14.6

Issue description

When using an AudioStreamPlayer with AudioStreamPolyphonic, no "finished" signal is emitted when a stream finishes playing.

A suggestion:
AudioStreamPolyphonic emits its own "finished" signal that includes the stream id.

Steps to reproduce

Example project attached.

var player = get_node("AudioStreamPlayer")
player.connect("finished", handle_finished)
var playback = player.get_stream_playback
playback_play_stream(preload("res://oneshot.wav")

func handle_finished():
     print("finished")`

Minimal reproduction project

AudioPolyphonicStreamTest.zip

@AThousandShips
Copy link
Member

AThousandShips commented Mar 19, 2023

This is because it always returns the requested number of frames when calling mix which is the way the server detects that playback is done

Though I'm not sure this stream is supposed to be finished as you can add new streams to it.

@MJacred
Copy link
Contributor

MJacred commented May 20, 2023

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

4 participants