You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated based on feedback from audio team meeting.
Removed the override flag, changed speaker_mode to allow taking a 'Default' value
(to correspond to using the audio driver speaker_mode). Moved the setting to
audio/general.
Removed the channel remap settings from project settings, and made configuring them
done through exposed methods on AudioServer (get/set_channel_remap).
Returns the mapping for the stereo channel index at [param output_channel]. Channel index values correspond to the following stereo channels:
126
+
- [code]0[/code]: Front left and right
127
+
- [code]1[/code]: Center and LFE (bass)
128
+
- [code]2[/code]: Back left and right
129
+
- [code]3[/code]: Side left and right
130
+
- [code]-1[/code]: Muted
131
+
The default is for the [param output_channel] to map to the same corresponding internal stereo channel.
132
+
</description>
133
+
</method>
121
134
<methodname="get_driver_name"qualifiers="const">
122
135
<returntype="String" />
123
136
<description>
@@ -322,6 +335,19 @@
322
335
[b]Note:[/b] Using this method is equivalent to calling [method set_bus_volume_db] with the result of [method @GlobalScope.linear_to_db] on a value.
323
336
</description>
324
337
</method>
338
+
<methodname="set_channel_remap">
339
+
<returntype="void" />
340
+
<paramindex="0"name="output_channel"type="int" />
341
+
<paramindex="1"name="source_channel"type="int" />
342
+
<description>
343
+
Given a stereo channel index [param output_channel], configures the [AudioServer] to map it to the internal channel [param source_channel]. Channel index values correspond to the following stereo channels:
344
+
- [code]0[/code]: Front left and right
345
+
- [code]1[/code]: Center and LFE (bass)
346
+
- [code]2[/code]: Back left and right
347
+
- [code]3[/code]: Side left and right
348
+
Setting an output channel to an invalid source channel (e.g. [code]-1[/code]) will mute output from that channel. If the current [method get_speaker_mode] does not use a particular channel, mapping that source channel to an output channel will mute the output channel.
Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing.
If [code]true[/code], the number of audio channels processed by Godot is set via the Channel Override [code]speaker_mode[/code] instead of the speaker mode of the current audio device.
396
-
[b]Note:[/b] This setting is intended for debugging, testing, and troubleshooting, and should not be enabled on production builds.
Audio channel remapping index for the front left/right speakers (stereo channel 0). This causes the front speakers to play audio from the given stereo channel. Useful for testing different audio device configurations without needing specific hardware.
400
-
[b]Note:[/b] Channel remapping is only enabled when [code]override_channels[/code] is true.
Audio channel remapping index for the center speaker and LFE channel (stereo channel 1). This causes the center speaker (and LFE channel) to play audio from the given stereo channel. Useful for testing different audio device configurations without needing specific hardware.
404
-
[b]Note:[/b] Channel remapping is only enabled when [code]override_channels[/code] is true.
Audio channel remapping index for the rear left/right speakers (stereo channel 2). This causes the rear speakers to play audio from the given stereo channel. Useful for testing different audio device configurations without needing specific hardware.
408
-
[b]Note:[/b] Channel remapping is only enabled when [code]override_channels[/code] is true.
Audio channel remapping index for the side left/right speakers (stereo channel 3). This causes the side speakers to play audio from the given stereo channel. Useful for testing different audio device configurations without needing specific hardware.
412
-
[b]Note:[/b] Channel remapping is only enabled when [code]override_channels[/code] is true.
The speaker mode used by Godot when [code]override_channels[/code] is true. Additional channels are muted (e.g. rear speaker channels when set to Stereo speaker mode 0).
Sets the [url=https://developer.apple.com/documentation/avfaudio/avaudiosessioncategory]AVAudioSessionCategory[/url] on iOS. Use the [code]Playback[/code] category to get sound output, even if the phone is in silent mode.
The speaker mode used internally by Godot. [code]Default[/code] will use the audio drivers speaker mode, while other values will override the internal speaker mode, and thus the number of audio channels, used by the [AudioServer].
450
+
When the internal speaker mode differs from the drivers speaker mode, audio channels will be muted, ignored, or mapped to the audio drivers channels.
If [code]true[/code], text-to-speech support is enabled on startup, otherwise it is enabled first time TTS method is used, see [method DisplayServer.tts_get_voices] and [method DisplayServer.tts_speak].
473
454
[b]Note:[/b] Enabling TTS can cause addition idle CPU usage and interfere with the sleep mode, so consider disabling it if TTS is not used.
// TODO: Buffer size is hardcoded for now. This would be really nice to have as a project setting because currently it limits audio latency to an absolute minimum of 11ms with default mix rate, but there's some additional work required to make that happen. See TODOs in `_mix_step_for_channel`.
1584
1576
// When this becomes a project setting, it should be specified in milliseconds rather than raw sample count, because 512 samples at 192khz is shorter than it is at 48khz, for example.
0 commit comments