Skip to content

Return the length of the longest stream in AudioStreamRandomizer #105954

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

Closed

Conversation

Mickeon
Copy link
Member

@Mickeon Mickeon commented Apr 30, 2025

Fixes #105929
Fixes #104684

Currently, AudioStreamRandomizer's get_length()returns 0.0, meaning the engine essentially thinks the length cannot be obtained. This is somewhat silly in hindsight.

This PR makes it so that the longest... length out of the available streams in the AudioStreamRandomizer is chosen, thus allowing AudioStreamInteractive to work with it, as well.
From there, it is up to the developer to ensure all random streams are roughly the same length, in order to avoid awkward silence.

As of writing this has not been tested just yet. It may need to be documented as well.

@Mickeon Mickeon added this to the 4.5 milestone Apr 30, 2025
@Mickeon Mickeon changed the title Return length in AudioStreamRandomizer Return the length of the longest stream in AudioStreamRandomizer Apr 30, 2025
@Mickeon
Copy link
Member Author

Mickeon commented Jun 10, 2025

Closed as #105952 has been discussed to be preferable

@Mickeon Mickeon closed this Jun 10, 2025
@Mickeon Mickeon removed this from the 4.5 milestone Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AudioStreamInteractive treats AudioStreamRandomizer as if it has no length. AudioStreamPlaylist ignores AudioStreamRandomizer
1 participant