OpenTok.IAudioDevice

public interface IAudioDevice

Defines an Audio device to be used by all publishers and subscribers.

Methods

Name Description
DestroyAudio() Called when the IAudioDevice instance is destroyed.
DestroyAudioCapturer() Called when th audio capturer for the IAudioDevice instance is destroyed.
DestroyAudioRenderer() Called when th audio renderer for the IAudioDevice instance is destroyed.
GetAudioCapturerSettings() → {AudioDeviceSettings} Called when the IAudioDevice instance requires settings.
GetAudioRendererSettings() → {AudioDeviceSettings} Gets settings for the audio renderer for the IAudioDevice instance.
GetEstimatedAudioCaptureDelay() → {int} Gets the estimated audio capture delay.
GetEstimatedAudioRenderDelay() → {int} Gets the estimated audio render delay.
InitAudio(audioBus)
InitAudioCapturer() Called when the audio capturer for the IAudioDevice instance is initialized.
InitAudioRenderer() Called when the audio renderer for the IAudioDevice instance is initialized.
IsAudioCapturerInitialized() → {bool} Checks if the audio capturer for the IAudioDevice instance is initialized.
IsAudioCapturerStarted() → {bool} Checks if the audio capturer for the IAudioDevice instance is started.
IsAudioRendererInitialized() → {bool} Checks if the audio renderer for the IAudioDevice instance is initialized.
IsAudioRendererStarted() → {bool} Checks if the audio renderer for the IAudioDevice instance is started.
StartAudioCapturer() Called when the audio capturer starts.
StartAudioRenderer() Called when the audio renderer starts.
StopAudioCapturer() Called when the audio capturer stops.
StopAudioRenderer() Called when the audio renderer stops.

DestroyAudio()

Called when the IAudioDevice instance is destroyed.

DestroyAudioCapturer()

Called when th audio capturer for the IAudioDevice instance is destroyed.

DestroyAudioRenderer()

Called when th audio renderer for the IAudioDevice instance is destroyed.

GetAudioCapturerSettings() → {AudioDeviceSettings}

Called when the IAudioDevice instance requires settings. In your implementation of this method, return an AudioDeviceSettings object.

Returns:

AudioDeviceSettings

GetAudioRendererSettings() → {AudioDeviceSettings}

Gets settings for the audio renderer for the IAudioDevice instance.

Returns:

AudioDeviceSettings

GetEstimatedAudioCaptureDelay() → {int}

Gets the estimated audio capture delay.

Returns:

int

GetEstimatedAudioRenderDelay() → {int}

Gets the estimated audio render delay.

Returns:

int

InitAudio(audioBus)

Parameters:
Name Type Description
audioBus AudioDevice.AudioBus The instance of the AudioBus to use for all publishers and subscribers.

InitAudioCapturer()

Called when the audio capturer for the IAudioDevice instance is initialized.

InitAudioRenderer()

Called when the audio renderer for the IAudioDevice instance is initialized.

IsAudioCapturerInitialized() → {bool}

Checks if the audio capturer for the IAudioDevice instance is initialized.

Returns:

bool

IsAudioCapturerStarted() → {bool}

Checks if the audio capturer for the IAudioDevice instance is started.

Returns:

bool

IsAudioRendererInitialized() → {bool}

Checks if the audio renderer for the IAudioDevice instance is initialized.

Returns:

bool

IsAudioRendererStarted() → {bool}

Checks if the audio renderer for the IAudioDevice instance is started.

Returns:

bool

StartAudioCapturer()

Called when the audio capturer starts. You should begin providing audio samples to the AudioBus.WriteCaptureData(IntPtr buffer, int numberOfSamples) method.

StartAudioRenderer()

Called when the audio renderer starts. You should begin receiving audio samples from the AudioBus.ReadRenderData(IntPtr buffer, int numberOfSamples) method.

StopAudioCapturer()

Called when the audio capturer stops.

StopAudioRenderer()

Called when the audio renderer stops.