Skip to content
0.2.0-dev Download ZIP
42 lines ·2.1 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="AudioEffectRecord" inherits="AudioEffect" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Audio effect used for recording the sound from an audio bus.
5 </brief_description>
6 <description>
7 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.
8 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.
9 Can be used (with an [AudioStreamMicrophone]) to record from a microphone.
10 [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.
11 </description>
12 <tutorials>
13 <link title="Recording with microphone">$DOCS_URL/tutorials/audio/recording_with_microphone.html</link>
14 <link title="Audio Microphone Record Demo">https://godotengine.org/asset-library/asset/2760</link>
15 </tutorials>
16 <methods>
17 <method name="get_recording" qualifiers="const">
18 <return type="AudioStreamWAV" />
19 <description>
20 Returns the recorded sample.
21 </description>
22 </method>
23 <method name="is_recording_active" qualifiers="const">
24 <return type="bool" />
25 <description>
26 Returns whether the recording is active or not.
27 </description>
28 </method>
29 <method name="set_recording_active">
30 <return type="void" />
31 <param index="0" name="record" type="bool" />
32 <description>
33 If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
34 </description>
35 </method>
36 </methods>
37 <members>
38 <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamWAV.Format" default="1">
39 Specifies the format in which the sample will be recorded.
40 </member>
41 </members>
42</class>