Inherits: AudioEffect < Resource < RefCounted < Object
Captures audio from an audio bus in real-time.
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.
|
can_get_buffer ( int frames ) const | |
void | clear_buffer ( ) |
get_buffer ( int frames ) | |
get_buffer_length_frames ( ) const | |
get_discarded_frames ( ) const | |
get_frames_available ( ) const | |
get_pushed_frames ( ) const |
0.1
Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized.
Returns true if at least frames audio frames are available to read in the internal ring buffer.
Clears the internal ring buffer.
Gets the next frames audio samples from the internal ring buffer.
Returns a PackedVector2Array containing exactly frames audio samples if available, or an empty PackedVector2Array if insufficient data was available.
Returns the total size of the internal ring buffer in frames.
Returns the number of audio frames discarded from the audio bus due to full buffer.
Returns the number of frames available to read using get_buffer.
Returns the number of audio frames inserted from the audio bus.
© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_audioeffectcapture.html