EOS API reference page for EOS_RTCAudio_AddNotifyAudioDevicesChanged

2 分で読めます


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



Parameter Type And NameUsage Information
EOS_HRTCAudio Handle
const EOS_RTCAudio_AddNotifyAudioDevicesChangedOptions* Options
void* ClientDataArbitrary data that is passed back in the CompletionDelegate
const EOS_RTCAudio_OnAudioDevicesChangedCallback CompletionDelegateThe callback to be fired when an audio device change occurs