AudioStreamPlayer should use internal channels for automatic polyphony #5705
elvisish
started this conversation in
Engine Core
Replies: 1 comment 6 replies
-
Automatic polyphony support is already implemented in 4.0 🙂 It won't be backported to 3.x though, as it relies on a rewrite of the audio system. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
AudioStreamPlayers can only play one sound at once, which means the user has to set-up multiple AudioStreamPlayers for overlapping sounds, or rapid-fire sounds that shouldn't cut each other off. If they used internal channels to play the sounds on, the user could define a polyphony for each AudioStreamPlayer and it could automatically find a free channel to play the sound on, without interrupting the current sound. The channel could be manually defined, but by default it could just be chosen and if all of the channels are currently playing, the AudioStreamPlayer could just go back to the earliest channel and stop the stream for use.
It could also be easier to allow for automatically crossfade between channels, having the current channel fade out while the new channel fades in, but all still on the same AudioStreamPlayer.
Beta Was this translation helpful? Give feedback.
All reactions