2018-08-20 22:35:30 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 08:08:05 +00:00
<class name= "AudioEffectRecord" inherits= "AudioEffect" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2018-08-20 22:35:30 +00:00
<brief_description >
2021-09-06 13:45:22 +00:00
Audio effect used for recording the sound from an audio bus.
2018-08-20 22:35:30 +00:00
</brief_description>
<description >
2023-11-28 12:59:12 +00:00
Allows the user to record the sound from an audio bus into an [AudioStreamWAV]. When used on the "Master" audio bus, this includes all audio output by Godot.
Unlike [AudioEffectCapture], this effect encodes the recording with the given format (8-bit, 16-bit, or compressed) instead of giving access to the raw audio samples.
2021-09-06 13:45:22 +00:00
Can be used (with an [AudioStreamMicrophone]) to record from a microphone.
2023-11-28 12:59:12 +00:00
[b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
2018-08-20 22:35:30 +00:00
</description>
<tutorials >
2021-11-15 09:43:07 +00:00
<link title= "Recording with microphone" > $DOCS_URL/tutorials/audio/recording_with_microphone.html</link>
2020-10-01 08:34:47 +00:00
<link title= "Audio Mic Record Demo" > https://godotengine.org/asset-library/asset/527</link>
2018-08-20 22:35:30 +00:00
</tutorials>
<methods >
<method name= "get_recording" qualifiers= "const" >
2022-07-23 14:34:36 +00:00
<return type= "AudioStreamWAV" />
2018-08-20 22:35:30 +00:00
<description >
2020-03-03 18:21:21 +00:00
Returns the recorded sample.
2018-08-20 22:35:30 +00:00
</description>
</method>
<method name= "is_recording_active" qualifiers= "const" >
2021-07-30 13:28:05 +00:00
<return type= "bool" />
2018-08-20 22:35:30 +00:00
<description >
2020-03-03 18:21:21 +00:00
Returns whether the recording is active or not.
2018-08-20 22:35:30 +00:00
</description>
</method>
<method name= "set_recording_active" >
2021-07-30 13:28:05 +00:00
<return type= "void" />
2022-08-06 18:11:48 +00:00
<param index= "0" name= "record" type= "bool" />
2018-08-20 22:35:30 +00:00
<description >
2020-03-03 18:21:21 +00:00
If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
2018-08-20 22:35:30 +00:00
</description>
</method>
</methods>
<members >
2022-07-23 14:34:36 +00:00
<member name= "format" type= "int" setter= "set_format" getter= "get_format" enum= "AudioStreamWAV.Format" default= "1" >
Specifies the format in which the sample will be recorded. See [enum AudioStreamWAV.Format] for available formats.
2018-08-20 22:35:30 +00:00
</member>
</members>
</class>