Investigate possible improvements to the Audio systems in Godot. #6766
Replies: 1 comment 1 reply
-
See #1472 where I proposed adding a SceneTreeAudioStreamPlayer. Positional playback is a challenge indeed, and may not be feasible at all with this approach though. Still, it's fine for UI sounds and some gameplay sounds (such as announcer voices).
The general approach is to use multiple nodes to allow for parallel playback, or a single node with AnimationPlayer with audio playback tracks if multiple sounds don't need to play at the same time.
Set Polyphony above 1 in the AudioStreamPlayer to avoid this. The default is 1 to avoid performance issues if your sound has silence near the end.
I don't think this is the right approach. Configuration should be done as locally as possible unless there's a good reason to make it project-wide (e.g. for localization remaps). |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
The way audio is handled at the moment is very un-intuitive.
you have to have node in a scene.
This is kind of pointless. 90% of the time, you end up playing the audio from code or animation player anyway and requires you to have a node path of the audio player node.This is required for there to be locational sound however there should still be a way to play audio from code, this would be especially useful for in-game menus.
This node need/must to have one stream assigned to it.
This makes it harder to update sound across the game and you can assign only one stream.
If you play the audio before it's finished, it's cut off
I have yet to encounter case where this is actually desired.
I propose that there is one central Audio map in project settings that would work similarly to the Input Map.
Set up Alias and add stream/(maybe even multiple streams). The nodes in the scene tree just handle the playing and the sound is not cut off unless specified.
Beta Was this translation helpful? Give feedback.
All reactions