EOS_RTCAudio_AddNotifyAudioDevicesChanged

EOS API reference page for EOS_RTCAudio_AddNotifyAudioDevicesChanged

Choose your implementation method:

C

C#

Remarks

Register to receive notifications when an audio device is added or removed to the system. If the returned NotificationId is valid, you must call EOS_RTCAudio_RemoveNotifyAudioDevicesChanged when you no longer wish to have your CompletionDelegate called. The library will try to use user selected audio device while following these rules:

  • if none of the audio devices has been available and connected before - the library will try to use it;

  • if user selected device failed for some reason, default device will be used instead (and user selected device will be memorized);

  • if user selected a device but it was not used for some reason (and default was used instead), when devices selection is triggered we will try to use user selected device again;

  • triggers to change a device: when new audio device appears or disappears - library will try to use previously user selected;

  • if for any reason, a device cannot be used - the library will fallback to using default;

  • if a configuration of the current audio device has been changed, it will be restarted.

Return Value

Notification ID representing the registered callback if successful, an invalid NotificationId if not

See Also

EOS_INVALID_NOTIFICATIONID, EOS_RTCAudio_RemoveNotifyAudioDevicesChanged, EOS_RTCAudio_SetAudioInputSettingsOptions, EOS_RTCAudio_SetAudioOutputSettingsOptions

Parameters

EOS_RTCAudio_AddNotifyAudioDevicesChanged

Parameter Type And Name

Usage Information

EOS_HRTCAudio Handle

const EOS_RTCAudio_AddNotifyAudioDevicesChangedOptions* Options

void* ClientData

Arbitrary data that is passed back in the CompletionDelegate

const EOS_RTCAudio_OnAudioDevicesChangedCallback CompletionDelegate

The callback to be fired when an audio device change occurs

Related API Members

Remarks

Register to receive notifications when an audio device is added or removed to the system. If the returned NotificationId is valid, you must call {RemoveNotifyAudioDevicesChanged} when you no longer wish to have your CompletionDelegate called. The library will try to use user selected audio device while following these rules:

  • if none of the audio devices has been available and connected before - the library will try to use it;

  • if user selected device failed for some reason, default device will be used instead (and user selected device will be memorized);

  • if user selected a device but it was not used for some reason (and default was used instead), when devices selection is triggered we will try to use user selected device again;

  • triggers to change a device: when new audio device appears or disappears - library will try to use previously user selected;

  • if for any reason, a device cannot be used - the library will fallback to using default;

  • if a configuration of the current audio device has been changed, it will be restarted.

Return Value

Notification ID representing the registered callback if successful, an invalid NotificationId if not

See Also

{Common.InvalidNotificationid}, {RemoveNotifyAudioDevicesChanged}, {SetAudioInputSettingsOptions}, {SetAudioOutputSettingsOptions}

Parameters

RTCAudio.RTCAudioInterface.AddNotifyAudioDevicesChanged

Parameter Type And Name

Usage Information

AddNotifyAudioDevicesChangedOptions options

object clientData

Arbitrary data that is passed back in the CompletionDelegate

OnAudioDevicesChangedCallback completionDelegate

The callback to be fired when an audio device change occurs

Related API Members