summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-02-14 18:09:09 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-02-17 19:35:46 +0100
commit1d35b3749957d6f3de12de1f302a1e36c4c989f9 (patch)
tree68dda1bf8e33d442663dd7015c44ba04efba7be1 /servers
parentb6f3af4698d1d4fa7d2ba73b460e1f4d76505d3f (diff)
Expose `AudioServer.capture_device` as a property
This is more consistent with `AudioServer.device` (for output), which is already exposed as a property.
Diffstat (limited to 'servers')
-rw-r--r--servers/audio_server.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp
index f00b8077d1..9d83e5cacc 100644
--- a/servers/audio_server.cpp
+++ b/servers/audio_server.cpp
@@ -1731,6 +1731,10 @@ void AudioServer::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "bus_count"), "set_bus_count", "get_bus_count");
ADD_PROPERTY(PropertyInfo(Variant::STRING, "device"), "set_device", "get_device");
+ ADD_PROPERTY(PropertyInfo(Variant::STRING, "capture_device"), "capture_set_device", "capture_get_device");
+ // The default value may be set to an empty string by the platform-specific audio driver.
+ // Override for class reference generation purposes.
+ ADD_PROPERTY_DEFAULT("capture_device", "Default");
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "playback_speed_scale"), "set_playback_speed_scale", "get_playback_speed_scale");
ADD_SIGNAL(MethodInfo("bus_layout_changed"));