-
-
Notifications
You must be signed in to change notification settings - Fork 23.8k
Replace AudioStreamPlayer mix target with output channels #106266
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
base: master
Are you sure you want to change the base?
Replace AudioStreamPlayer mix target with output channels #106266
Conversation
ae568dc to
cb52adb
Compare
cb52adb to
7dde803
Compare
|
It seems documentation translations also need to be removed/updated. Any advice for that would be appreciated as well as I'm also unfamiliar with that process. |
|
Translations aren't handled here, but the way this breaks compatibility by removing properties is probably incorrect, and some comaptibility code should be added instead |
|
Other than breaking compatibility, I feel like this is displaying too much info for the average user. The solution that first came to mind is adding a "Custom" Mix target, which would only then expose those inspector parameters. |
|
Sorry, I fat fingered the close button 🙃 Can't say I'm opposed to the idea, but I'll have to look into how to implement conditional options. |
|
Is there a corresponding proposal for this? If not, I would seriously recommend making one proper. This sounds like it has a very niche use-case. |
|
It may be a niche use case, but to me its more questionable why stereo, center+LFE, and all speakers are the only options. It seems reasonable to expect a way to output to any audio channel and not have arbitrary groups. |
|
Considering the nature and philosophy of Godot I believe this is a must. As someone into audio and Godot I have for a long time longed for this . Please make it happen. |
|
I just had the chance to test this thanks to @Joseph-DiGiovanni. This is truly useful not just for games but for other applications made with Godot where multiple channel audio requires a total control. It is so simple to use and works solid and flawless out of the box that sincerely, I could not understand not having this in Godot, it opens a new world of possibilities. In order to avoid breaking compatibility issues I propose this arrangement in the interface for the proposal controls (marked by the red bracket in the image) not removing any of the original AudioStreamPlayer node options. The new Mix Channel Override section, if used, would override the spared Mix Target option enabling sound redirection to specific channels and thus preventing breaking applications created in former releases. |
7dde803 to
b058065
Compare
This PR replaces the limiting
mix_targetoptions of AudioStreamPlayer with more granularoutput_channels. For example, it is currently not possible to output to only the rear speakers, or only one side. This change allows audio to be output to any combination of speakers, or even just a single one.In addition, I've added a
downmixoption which will take the desired output channels and use a standard downmixing equation to best preserve positional audio when using an output device with fewer channels. This is enabled by default, but can be disabled to only play audio when the desired channel is available. A good use case for disabling it would be a speaker test.While a majority of the work is done, I need some assistance properly removing
mix_targetin favor ofoutput_channelsto not break existing projects. The conversion should be straightforward, but I'm not familiar with that process at all unfortunately.