AudioEffectCapture

Inherits: AudioEffect < Resource < Reference < 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. get_buffer and process it as needed, for example to capture data from a microphone, 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.

Properties

Methods

Property Descriptions

  • float buffer_length Length of the internal ring buffer, in seconds. Setting the buffer length will have no effect if already initialized.

    Method Descriptions

  • bool can_get_buffer ( int frames ) const true if at least frames audio frames are available to read in the internal ring buffer.

  • clear_buffer ( ) Clears the internal ring buffer.

  • PoolVector2Array get_buffer ( int frames ) frames audio samples from the internal ring buffer. PoolVector2Array containing exactly frames audio samples if available, or an empty PoolVector2Array if insufficient data was available.

  • int get_buffer_length_frames ( ) const Returns the total size of the internal ring buffer in frames.

  • int get_discarded_frames ( ) const Returns the number of audio frames discarded from the audio bus due to full buffer.

  • int get_frames_available ( ) const get_buffer.

  • int get_pushed_frames ( ) const Returns the number of audio frames inserted from the audio bus.