Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

AudioEffectRecord

繼承: AudioEffect < Resource < RefCounted < Object

用於錄製音訊匯流排輸出的音訊效果。

說明

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.

Can be used (with an AudioStreamMicrophone) to record from a microphone.

Note: ProjectSettings.audio/driver/enable_input must be true for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.

教學

屬性

Format

format

1

方法

AudioStreamWAV

get_recording() const

bool

is_recording_active() const

void

set_recording_active(record: bool)


屬性說明

Format format = 1 🔗

指定錄音所使用的格式。


方法說明

AudioStreamWAV get_recording() const 🔗

返回錄製的樣本。


bool is_recording_active() const 🔗

返回錄音是否啟動。


void set_recording_active(record: bool) 🔗

若為 true 則開始錄音;重新開始會刪除先前錄得的樣本。