NoiseCancellationAudioDevice

class NoiseCancellationAudioDevice(context: Context, capturerFactory: AudioCapturerFactory, rendererFactory: AudioRendererFactory) : AudioDevice, ExternalAudioProcessor

NoiseCancellationAudioDevice is the audio plugin. While the first argument is required, the latter two arguments capturerFactory and endererFactory are optional and allow for the developer to override the default factory methods for constructing custom audio capturers and renderers.

Parameters

context

The Application or activity context to be used by the plugin

capturerFactory

An optional argument that allows for the capturer to be overridden.

rendererFactory

An optional argument that allows for the renderer to be overridden.

Constructors

NoiseCancellationAudioDevice
Link copied to clipboard
fun NoiseCancellationAudioDevice(context: Context, capturerFactory: AudioCapturerFactory = ::DefaultCapturerFactory, rendererFactory: AudioRendererFactory = ::DefaultRendererFactory)
The Application or activity context to be used by the plugin

Functions

getCapturerFormat
Link copied to clipboard
open override fun getCapturerFormat(): AudioFormat
Returns the PCM audio capturer format.
getEnabled
Link copied to clipboard
open override fun getEnabled(): Boolean
Returns if NoiseCancellation is enabled in the room.
getPausedProcessing
Link copied to clipboard
fun getPausedProcessing(): Boolean
Returns if the noise cancellation processing is paused.
getRendererFormat
Link copied to clipboard
open override fun getRendererFormat(): AudioFormat?
Returns the PCM audio renderer format.
onInitCapturer
Link copied to clipboard
open override fun onInitCapturer(): Boolean
Called by the underlying audio subsystem when the capturer is ready to be initialized.
onInitRenderer
Link copied to clipboard
open override fun onInitRenderer(): Boolean
Called by the underlying audio subsystem when the Renderer is ready to be initialized.
onStartCapturing
Link copied to clipboard
open override fun onStartCapturing(audioDeviceContext: AudioDeviceContext): Boolean
Called by the underlying audio subsystem when the capturer is ready to capture.
onStartRendering
Link copied to clipboard
open override fun onStartRendering(audioDeviceContext: AudioDeviceContext): Boolean
Called by the underlying audio subsystem when the renderer is ready to render.
onStopCapturing
Link copied to clipboard
open override fun onStopCapturing(): Boolean
Called by the underlying audio subsystem when the capturer stops capturing.
onStopRendering
Link copied to clipboard
open override fun onStopRendering(): Boolean
Called by the underlying audio subsystem when the capturer stops rendering.
setPausedProcessing
Link copied to clipboard
fun setPausedProcessing(paused: Boolean)
Allows for (un)pausing noise cancellation processing.