Add AudioServer.get_driver_name() to get the actual audio driver name
The project setting does not reflect CLI argument overrides (including `--headless` which sets the audio driver to `Dummy`), so it can't be reliably used to detect which audio driver is actually being used at run-time.
This commit is contained in:
parent
533c616cb8
commit
77c31b9cc8
4 changed files with 15 additions and 0 deletions
|
|
@ -376,6 +376,7 @@
|
|||
<member name="audio/driver/driver" type="String" setter="" getter="">
|
||||
Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used.
|
||||
The [code]Dummy[/code] audio driver disables all audio playback and recording, which is useful for non-game applications as it reduces CPU usage. It also prevents the engine from appearing as an application playing audio in the OS' audio mixer.
|
||||
To query the value that is being used at run-time (which may be overridden by command-line arguments or headless mode), use [method AudioServer.get_driver_name].
|
||||
[b]Note:[/b] The driver in use can be overridden at runtime via the [code]--audio-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url].
|
||||
</member>
|
||||
<member name="audio/driver/enable_input" type="bool" setter="" getter="" default="false">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue