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.

AudioEffectCapture

Inherits: AudioEffect < Resource < RefCounted < Object

Captures audio from an audio bus in real-time.

Description

AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer.

Application code should consume these audio frames from this ring buffer using get_buffer and process it as needed, for example to capture data from an AudioStreamMicrophone, implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating point PCM.

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.

Tutorials

Properties

float

buffer_length

0.1

Methods

bool

can_get_buffer ( int frames ) const

void

clear_buffer ( )

PackedVector2Array

get_buffer ( int frames )

int

get_buffer_length_frames ( ) const

int

get_discarded_frames ( ) const

int