CustomAudioSource

class CustomAudioSource : ICustomSource<AudioTrack, AudioFrame>

The CustomAudioSource class serves as a customizable source for capturing and providing audio data. The class is useful for filter application such as audio noise suppression, or customized audio.

Properties

Link copied to clipboard
open override val isCapturing: Boolean

Returns a boolean indicating whether the CustomSource instance is actively capturing audio data. This allows the application to check the current state of the capturing process.

Functions

Link copied to clipboard
open override fun onFrame(frame: AudioFrame)

Injects an audio frame which content depends on the developer. For performance reasons, prefer recycling the AudioFrame to make sure not too many allocations are performed over time

Link copied to clipboard
open override fun startCapture(): AudioTrack

Defines and creates a new audio track to send it to a Publisher's addTrack().

Link copied to clipboard
open override fun stopCapture()

Stops the underlying audio tracks and informs the SDK to stop any pending operations related to this custom source.