LocalAudio

The LocalAudio model allows enabling and disabling the local participant's audio as well as setting and checking the capture mode and comfort noise level.

This model is supported only in SDK 3.7 and later.

Accessors

captureMode

captureMode: AudioCaptureMode

Allows setting and getting the local participant's audio capture mode in Dolby Voice conferences.

Returns: AudioCaptureMode


delegate

delegate: AudioDelegate

The object that acts as the delegate of the audio samples. It allows accessing the local participant's audio stream before sending the stream through an open session. You may use it to build speech recognition or audio moderation. Pre-processing audio is currently not supported. For more information, see the Accessing the Local Audio Stream guide.

The API is supported in SDK 3.8 and later.

Returns: AudioDelegate


Methods

getComfortNoiseLevel

getComfortNoiseLevel(completion: ((ComfortNoiseLevel?, Error?) -> Void))

Returns the comfort noise level setting for output devices in Dolby Voice conferences.


setComfortNoiseLevel

setComfortNoiseLevel(comfortNoiseLevel: ComfortNoiseLevel, completion: ((Error?) -> Void)?)

Sets the comfort noise level for output devices in Dolby Voice conferences.

Parameters:

NameTypeDescription
levelComfortNoiseLevelThe comfort noise level.

start

start(completion: ((_ error: Error?) -> Void)?)

Enables the local participant's audio and sends the audio to a conference.

The start method requires a few seconds to become effective.

Parameters:

NameTypeDefaultDescription
completion((_ error: NSError) -> Void)?nilThe block to execute when the query completes.

stop

stop(completion: ((_ error: Error?) -> Void)?)

Disables the local participant's audio and stops sending the audio to a conference.

The stop method requires a few seconds to become effective.

Parameters:

NameTypeDefaultDescription
completion((_ error: NSError) -> Void)?nilThe block to execute when the query completes