class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectRefCountedResourceAudioEffect AudioEffectCapture
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.

Unlike AudioEffectRecord, this effect only returns the raw audio samples instead of encoding them into an AudioStream.

float buffer_length<>():float

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

bool can_get_buffer<>( int frames=, frames:int=, ):bool

Returns true if at least frames audio frames are available to read in the internal ring buffer.

void clear_buffer<>():void

Clears the internal ring buffer.

Note: Calling this during a capture can cause the loss of samples which causes popping in the playback.

PackedVector2Array get_buffer<>( int frames=, frames:int=, ):PackedVector2Array

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.

The samples are signed floating-point PCM between -1 and 1. You will have to scale them if you want to use them as 8 or 16-bit integer samples. (v = 0x7fff * samples[0].x)

int get_buffer_length_frames<>():int

Returns the total size of the internal ring buffer in frames.

int get_discarded_frames<>():int

Returns the number of audio frames discarded from the audio bus due to full buffer.

int get_frames_available<>():int

Returns the number of frames available to read using get_buffer().

int get_pushed_frames<>():int

Returns the number of audio frames inserted from the audio bus.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...