Suggestions

close search

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

Visit the Vonage API Developer Portal

OpenTok.AudioDevice

A class that includes methods for setting the audio device to be used by publishers and subscribers. More...

Classes

class  AudioBus
 An audio bus used for all publisher and subscribers. This class is used to both read and write audio samples in order for them to be rendered or sent to remote peers. More...
class  InputAudioDevice
 Represents an input audio device (such as a microphone) available on the Windows system. See EnumerateInputAudioDevices and SetInputAudioDevice. More...
class  Notifications
 Represents a subscription to system audio device notifications. This object sends events when a system input or output audio device is added or removed, and when the default system input or output audio device changes. This instance can be disposed when no longer used to release unmanaged resources. More...
class  OutputAudioDevice
 Represents an output audio device (such as headphones or speakers) available on the Windows system. See EnumerateOutputAudioDevices and SetOutputAudioDevice. More...

Static Public Member Functions

static IList< InputAudioDeviceEnumerateInputAudioDevices ()
 Returns a list of available audio input devices on the system. More...
static IList< OutputAudioDeviceEnumerateOutputAudioDevices ()
 Returns a list of available audio output devices on the system. More...
static void SetInputAudioDevice (InputAudioDevice device)
 Sets the input audio device to be used by all subscribers. See EnumerateInputAudioDevices. More...
static void SetOutputAudioDevice (OutputAudioDevice device)
 Sets the output audio device to be used by all subscribers. See EnumerateOutputAudioDevices. More...
static InputAudioDevice GetDefaultInputAudioDevice ()
 Gets the system default audio input device. More...
static OutputAudioDevice GetDefaultOutputAudioDevice ()
 Gets the system default audio output device. More...
static void SetCustomAudioDevice (Context context, IAudioDevice audioDevice)
 Sets an instance of the IAudioDevice interface as the virtual audio device for a custom audio driver used by all publishers and subscribers. More...
static void RestartInputAudioDevice ()
 Restarts audio input device. This method must be called whenever a change in input device happens in the custom audio device to let the SDK perform the necessary corrections for the new device. If a custom audio device has been set via SetCustomAudioDevice, this will also trigger the following IAudioDevice methods in order: More...
static void RestartOutputAudioDevice ()
 Restarts audio output device. This method must be called whenever a change in output device happens in the custom audio device to let the SDK perform the necessary corrections for the new device. If a custom audio device has been set via SetCustomAudioDevice, this will also trigger the following IAudioDevice methods in order: More...

Detailed Description

A class that includes methods for setting the audio device to be used by publishers and subscribers.

Member Function Documentation

◆ EnumerateInputAudioDevices()

static IList<InputAudioDevice> OpenTok.AudioDevice.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.

◆ EnumerateOutputAudioDevices()

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

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

Returns
A list of OutputAudioDevice objects, representing available audio output devices on the system.

◆ GetDefaultInputAudioDevice()

static InputAudioDevice OpenTok.AudioDevice.GetDefaultInputAudioDevice ( )

Gets the system default audio input device.

Returns
The system default audio input device.

◆ GetDefaultOutputAudioDevice()

static OutputAudioDevice OpenTok.AudioDevice.GetDefaultOutputAudioDevice ( )

Gets the system default audio output device.

Returns
The system default audio output device.

◆ RestartInputAudioDevice()

static void OpenTok.AudioDevice.RestartInputAudioDevice ( )

Restarts audio input device. This method must be called whenever a change in input device happens in the custom audio device to let the SDK perform the necessary corrections for the new device. If a custom audio device has been set via SetCustomAudioDevice, this will also trigger the following IAudioDevice methods in order:

  • StopAudioCapturer
  • InitAudioCapturer (only if IsAudioCapturerInitialized returns false)
  • StartAudioCapturer (only if IsAudioCapturerStarted returns false)

◆ RestartOutputAudioDevice()

static void OpenTok.AudioDevice.RestartOutputAudioDevice ( )

Restarts audio output device. This method must be called whenever a change in output device happens in the custom audio device to let the SDK perform the necessary corrections for the new device. If a custom audio device has been set via SetCustomAudioDevice, this will also trigger the following IAudioDevice methods in order:

  • StopAudioRenderer
  • InitAudioRenderer (only if IsAudioRendererInitialized returns false)
  • StartAudioRenderer (only if IsAudioRendererStarted returns false)

◆ SetCustomAudioDevice()

static void OpenTok.AudioDevice.SetCustomAudioDevice ( Context  context,
IAudioDevice  audioDevice 
)

Sets an instance of the IAudioDevice interface as the virtual audio device for a custom audio driver used by all publishers and subscribers.

Returns
void

◆ SetInputAudioDevice()

static void OpenTok.AudioDevice.SetInputAudioDevice ( InputAudioDevice  device)

Sets the input audio device to be used by all subscribers. See EnumerateInputAudioDevices.

Parameters
deviceThe selected device to configure as default audio input

◆ SetOutputAudioDevice()

static void OpenTok.AudioDevice.SetOutputAudioDevice ( OutputAudioDevice  device)

Sets the output audio device to be used by all subscribers. See EnumerateOutputAudioDevices.

Parameters
deviceThe selected device to configure as default audio output