summaryrefslogtreecommitdiff
path: root/doc/classes/AudioEffectRecord.xml
blob: ff034389fc3760b6c591be9a4eb7e82e7c1e4843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioEffectRecord" inherits="AudioEffect" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
	<brief_description>
		Audio effect used for recording the sound from an audio bus.
	</brief_description>
	<description>
		Allows the user to record the sound from an audio bus. This can include all audio output by Godot when used on the "Master" audio bus.
		Can be used (with an [AudioStreamMicrophone]) to record from a microphone.
		It sets and gets the format in which the audio file will be recorded (8-bit, 16-bit, or compressed). It checks whether or not the recording is active, and if it is, records the sound. It then returns the recorded sample.
	</description>
	<tutorials>
		<link title="Recording with microphone">$DOCS_URL/tutorials/audio/recording_with_microphone.html</link>
		<link title="Audio Mic Record Demo">https://godotengine.org/asset-library/asset/527</link>
	</tutorials>
	<methods>
		<method name="get_recording" qualifiers="const">
			<return type="AudioStreamWAV" />
			<description>
				Returns the recorded sample.
			</description>
		</method>
		<method name="is_recording_active" qualifiers="const">
			<return type="bool" />
			<description>
				Returns whether the recording is active or not.
			</description>
		</method>
		<method name="set_recording_active">
			<return type="void" />
			<param index="0" name="record" type="bool" />
			<description>
				If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample.
			</description>
		</method>
	</methods>
	<members>
		<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.
		</member>
	</members>
</class>