Skip to content

AudioStreamPlayer not emitting signal when AudioStreamGeneratorPlayback audio frames are consumed. #43378

Open
@Rubonnek

Description

@Rubonnek

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions