Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

OpenTok.IAudioDeviceExtension

Defines additional methods and events for an IAudioDevice. When implementing a Custom Audio Device, this interface can be optionally implemented and if done so, once the CustomAudioDevice is assigned via AudioDevice.SetCustomAudioDevice, other static AudioDevice methods (like enumerating devices, selecting a specific device or subscribing to notifications) will be wired internally to the custom audio device implementation instead of the default static one. More...

Inherits OpenTok.IAudioDevice, and IDisposable.

Inherited by OpenTok.MMAudioDevice.

Public Member Functions

IList< AudioDevice.InputAudioDeviceEnumerateInputAudioDevices ()
 Returns a list of available audio input devices on the system. More...
IList< AudioDevice.OutputAudioDeviceEnumerateOutputAudioDevices ()
 Returns a list of available audio output devices on the system. More...
AudioDevice.InputAudioDevice GetDefaultInputAudioDevice ()
 Gets the system default audio input device. More...
AudioDevice.OutputAudioDevice GetDefaultOutputAudioDevice ()
 Gets the system default audio output device. More...
void SetInputAudioDevice (string deviceId)
 Selects a device for audio input. More...
void SetOutputAudioDevice (string deviceId)
 Selects a device for audio output. More...
- Public Member Functions inherited from OpenTok.IAudioDevice
void InitAudio (AudioDevice.AudioBus audioBus)
 Called when the AudioDevice is initialized. Use the AudioBus object to read write audio data. Call the AudioBus.ReadRenderData(IntPtr buffer, int numberOfSamples) and AudioBus.WriteCaptureData(IntPtr buffer, int numberOfSamples) methods to read render data from subscribers and write capture data to publishers. More...
void DestroyAudio ()
 Called when the IAudioDevice instance is destroyed. More...
void InitAudioCapturer ()
 Called when the audio capturer for the IAudioDevice instance is initialized. More...
void DestroyAudioCapturer ()
 Called when th audio capturer for the IAudioDevice instance is destroyed. More...
void StartAudioCapturer ()
 Called when the audio capturer starts. You should begin providing audio samples to the AudioBus.WriteCaptureData(IntPtr buffer, int numberOfSamples) method. More...
void StopAudioCapturer ()
 Called when the audio capturer stops. More...
bool IsAudioCapturerInitialized ()
 Checks if the audio capturer for the IAudioDevice instance is initialized. More...
bool IsAudioCapturerStarted ()
 Checks if the audio capturer for the IAudioDevice instance is started. More...
int GetEstimatedAudioCaptureDelay ()
 Gets the estimated audio capture delay. More...
AudioDeviceSettings GetAudioCapturerSettings ()
 Called when the IAudioDevice instance requires settings. In your implementation of this method, return an AudioDeviceSettings object. More...
void InitAudioRenderer ()
 Called when the audio renderer for the IAudioDevice instance is initialized. More...
void DestroyAudioRenderer ()
 Called when th audio renderer for the IAudioDevice instance is destroyed. More...
void StartAudioRenderer ()
 Called when the audio renderer starts. You should begin receiving audio samples from the AudioBus.ReadRenderData(IntPtr buffer, int numberOfSamples) method. More...
void StopAudioRenderer ()
 Called when the audio renderer stops. More...
bool IsAudioRendererInitialized ()
 Checks if the audio renderer for the IAudioDevice instance is initialized. More...
bool IsAudioRendererStarted ()
 Checks if the audio renderer for the IAudioDevice instance is started. More...
int GetEstimatedAudioRenderDelay ()
 Gets the estimated audio render delay. More...
AudioDeviceSettings GetAudioRendererSettings ()
 Gets settings for the audio renderer for the IAudioDevice instance. More...

Events

EventHandler< AudioDevice.Notifications.InputAudioDeviceEventArgsInputDeviceAdded
 Sent when a new audio input device is detected by the system. More...
EventHandler< AudioDevice.Notifications.OutputAudioDeviceEventArgsOutputDeviceAdded
 Sent when a new audio output device is detected by the system. More...
EventHandler< AudioDevice.Notifications.InputAudioDeviceEventArgsInputDeviceRemoved
 Sent when an audio input device is removed from the system. More...
EventHandler< AudioDevice.Notifications.OutputAudioDeviceEventArgsOutputDeviceRemoved
 Sent when an audio output device is removed from the system. More...
EventHandler< AudioDevice.Notifications.InputAudioDeviceEventArgsDefaultInputDeviceChanged
 Sent when the default audio input device changes at the system level. More...
EventHandler< AudioDevice.Notifications.OutputAudioDeviceEventArgsDefaultOutputDeviceChanged
 Sent when the default audio output device changes at the system level. More...

Detailed Description

Defines additional methods and events for an IAudioDevice. When implementing a Custom Audio Device, this interface can be optionally implemented and if done so, once the CustomAudioDevice is assigned via AudioDevice.SetCustomAudioDevice, other static AudioDevice methods (like enumerating devices, selecting a specific device or subscribing to notifications) will be wired internally to the custom audio device implementation instead of the default static one.

Member Function Documentation

◆ EnumerateInputAudioDevices()

IList<AudioDevice.InputAudioDevice> OpenTok.IAudioDeviceExtension.EnumerateInputAudioDevices ( )

Returns a list of available audio input devices on the system.

Returns
A list of InputAudioDevice objects, representing available audio input devices on the system.

Implemented in OpenTok.MMAudioDevice.

◆ EnumerateOutputAudioDevices()

IList<AudioDevice.OutputAudioDevice> OpenTok.IAudioDeviceExtension.EnumerateOutputAudioDevices ( )

Returns a list of available audio output devices on the system.

Returns
A list of InputAudioDevice objects, representing available audio input devices on the system.

Implemented in OpenTok.MMAudioDevice.

◆ GetDefaultInputAudioDevice()

AudioDevice.InputAudioDevice OpenTok.IAudioDeviceExtension.GetDefaultInputAudioDevice ( )

Gets the system default audio input device.

Returns
The system default audio input device.

Implemented in OpenTok.MMAudioDevice.

◆ GetDefaultOutputAudioDevice()

AudioDevice.OutputAudioDevice OpenTok.IAudioDeviceExtension.GetDefaultOutputAudioDevice ( )

Gets the system default audio output device.

Returns
The system default audio output device.

Implemented in OpenTok.MMAudioDevice.

◆ SetInputAudioDevice()

void OpenTok.IAudioDeviceExtension.SetInputAudioDevice ( string  deviceId)

Selects a device for audio input.

Parameters
deviceIdId of the device

Implemented in OpenTok.MMAudioDevice.

◆ SetOutputAudioDevice()

void OpenTok.IAudioDeviceExtension.SetOutputAudioDevice ( string  deviceId)

Selects a device for audio output.

Parameters
deviceIdId of the device

Implemented in OpenTok.MMAudioDevice.

Event Documentation

◆ DefaultInputDeviceChanged

EventHandler<AudioDevice.Notifications.InputAudioDeviceEventArgs> OpenTok.IAudioDeviceExtension.DefaultInputDeviceChanged

Sent when the default audio input device changes at the system level.

◆ DefaultOutputDeviceChanged

EventHandler<AudioDevice.Notifications.OutputAudioDeviceEventArgs> OpenTok.IAudioDeviceExtension.DefaultOutputDeviceChanged

Sent when the default audio output device changes at the system level.

◆ InputDeviceAdded

EventHandler<AudioDevice.Notifications.InputAudioDeviceEventArgs> OpenTok.IAudioDeviceExtension.InputDeviceAdded

Sent when a new audio input device is detected by the system.

◆ InputDeviceRemoved

EventHandler<AudioDevice.Notifications.InputAudioDeviceEventArgs> OpenTok.IAudioDeviceExtension.InputDeviceRemoved

Sent when an audio input device is removed from the system.

◆ OutputDeviceAdded

EventHandler<AudioDevice.Notifications.OutputAudioDeviceEventArgs> OpenTok.IAudioDeviceExtension.OutputDeviceAdded

Sent when a new audio output device is detected by the system.

◆ OutputDeviceRemoved

EventHandler<AudioDevice.Notifications.OutputAudioDeviceEventArgs> OpenTok.IAudioDeviceExtension.OutputDeviceRemoved

Sent when an audio output device is removed from the system.