diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-07 13:27:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 13:27:25 +0200 |
commit | af935af38dc0dfc01b010920c8624ac09491ea55 (patch) | |
tree | ab7ba5d301b6c5a4e9b06c259c160fa43252a038 /doc | |
parent | 1f2bcb8f025e33718d06a72cbd439f1ba02aed0f (diff) | |
parent | 47c558b98abf842910c780294314326662410cdf (diff) |
Merge pull request #30468 from SaracenOne/expose_audio_capture
Exposes capture methods to AudioServer + documentation
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/AudioServer.xml | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 7581ae6935..6f82b103db 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -42,6 +42,7 @@ <return type="Array"> </return> <description> + Returns the names of all audio input devices detected on the system. </description> </method> <method name="capture_set_device"> @@ -52,6 +53,20 @@ <description> </description> </method> + <method name="capture_start"> + <return type="int" enum="Error"> + </return> + <description> + Attempts to start recording from the audio driver's capture device. On success, the return value is [constant OK]. + </description> + </method> + <method name="capture_stop"> + <return type="int" enum="Error"> + </return> + <description> + Attempts to stop recording from the audio driver's capture device. On success, the return value is [constant OK]. + </description> + </method> <method name="generate_bus_layout" qualifiers="const"> <return type="AudioBusLayout"> </return> @@ -158,11 +173,32 @@ Returns the volume of the bus at index [code]bus_idx[/code] in dB. </description> </method> + <method name="get_capture_buffer"> + <return type="PoolIntArray"> + </return> + <description> + Returns an [PoolIntArray] containing audio frames from the capture device. + </description> + </method> + <method name="get_capture_position"> + <return type="int"> + </return> + <description> + Returns the write position of the capture device buffer. + </description> + </method> + <method name="get_capture_size"> + <return type="int"> + </return> + <description> + Returns the size of the capture device buffer. + </description> + </method> <method name="get_device_list"> <return type="Array"> </return> <description> - Returns the names of all audio devices detected on the system. + Returns the names of all audio output devices detected on the system. </description> </method> <method name="get_mix_rate" qualifiers="const"> @@ -388,7 +424,10 @@ Number of available audio buses. </member> <member name="device" type="String" setter="set_device" getter="get_device" default=""Default""> - Name of the current device (see [method get_device_list]). + Name of the current device for audio output (see [method get_device_list]). + </member> + <member name="capture_device" type="String" setter="capture_set_device" getter="capture_get_device" default=""Default""> + Name of the current device for audio input (see [method capture_get_device_list]). </member> <member name="global_rate_scale" type="float" setter="set_global_rate_scale" getter="get_global_rate_scale" default="1.0"> Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played twice as fast). |