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

Implement AudioStreamRoundRobin #5231

Closed
TokageItLab opened this issue Aug 23, 2022 · 4 comments
Closed

Implement AudioStreamRoundRobin #5231

TokageItLab opened this issue Aug 23, 2022 · 4 comments

Comments

@TokageItLab
Copy link
Member

TokageItLab commented Aug 23, 2022

Describe the project you are working on

3D platformer

Describe the problem or limitation you are having in your project

It is necessary to generate an array and cache each time to play audio at random.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

With AudioStreamRoundRobin, which can play audio at random, it would be easy to prepare and playback several patterns of footsteps or voices.

In addition, presuming the AudioTrack commented on in godotengine/godot#55218 (comment) is improved, it is expected to work well with the AudioTrack in Animation.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

It would be implemented similar to AudioStreamPlaylist in godotengine/godot#64488.

The difference is that only one audio from the list will be played each time, and it is possible to set the percentage of audio occurrence for each audio.

If this enhancement will not be used often, can it be worked around with a few lines of script?

Creating a controller is not that difficult, but combining it with AudioTrack is difficult.

Is there a reason why this should be core and not an add-on in the asset library?

The audio stream relates deeply to the core.

@KoBeWi
Copy link
Member

KoBeWi commented Aug 23, 2022

This already exists. It's called AudioStreamRandomizer.

@TokageItLab
Copy link
Member Author

@KoBeWi Wouldn't that just change the pitch, and it be impossible to replace the audio stream itself?

@KoBeWi
Copy link
Member

KoBeWi commented Aug 23, 2022

You can disable pitch randomization. And it supports adding and removing streams and also you can specify in what order they are played. I'd suggest reading the docs :v

@TokageItLab
Copy link
Member Author

Oh, I didn't notice it because it was folded. That might be enough, thanks.

@TokageItLab TokageItLab closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2022
@TokageItLab TokageItLab removed this from the 4.0 milestone Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Implemented
Development

No branches or pull requests

2 participants