-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Return the length of the playing stream for AudioStreamRandomizer #105952
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
Return the length of the playing stream for AudioStreamRandomizer #105952
Conversation
We should probably question what |
This comment was marked as resolved.
This comment was marked as resolved.
Yes, I've tested it and it plays everything in sequence as expected, so it's definitely caused by the same issue. I see the problem though - It would be a bit unclear if get_length changes its value based on the state of the stream, but it also doesn't make sense for it to be static on streams that can have variable length. The same issue is present for AudioStreamInteractive. I think for consistency, it makes more sense to return the length of the currently playing stream rather than the max length, since there are a lot of cases where users will need to use streams of variable length with AudioStreamInteractive. If someone wants to get the max length of all streams, they can do that in code, or we can make a helper function for the types of streams that could use it. |
3128977
to
e5eb3c5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed in the audio meeting, we prefer this solution to the one returning the length of the longest stream.
e5eb3c5
to
b6a3054
Compare
Thanks! |
Fixes #105929
Fixes #104684