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 not emitting signal when AudioStreamGeneratorPlayback audio frames are consumed. #43378

Open
Tracked by #76797
Rubonnek opened this issue Nov 7, 2020 · 0 comments

Comments

@Rubonnek
Copy link
Member

Rubonnek commented Nov 7, 2020

Godot version:
3.2 branch at commit be625f6

OS/device including version:

Arch Linux

Issue description:

As I was figuring out how the audio generator demo worked, I noticed that partially or completely filling the AudioStreamGeneratorPlayback audio frames once and the playing them would not make the AudioStreamPlayer fire any signals.

I was expecting a "finished" signal to fire, or perhaps a "loading" or "waiting" signal with which one could use to just stop the AudioStreamPlayer completely if wanted.

Steps to reproduce:
Run the attached project. The output and code from generator_demo.gd makes this issue more easily visible.

As a workaround, to stop the AudioStreamPlayer when using an AudioStreamGenerator resource, users have to keep track of the available audio frames in the AudioStreamGeneratorPlayback. Once all the available frames are consumed, the maximum available frames is visible again which means that the AudioStreamGeneratorPlayback is empty, which can be used to stop the AudioStreamPlayer. This is shown in the generator_demo.gd within the attached project.

Minimal reproduction project:
generator.zip
Based on: https://github.com/godotengine/godot-demo-projects/tree/master/audio/generator

Related
#30737
#33579
#33602

@Rubonnek Rubonnek added this to the 3.5 milestone Jun 30, 2022
@Rubonnek Rubonnek modified the milestones: 3.5, 4.x Oct 14, 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

1 participant