Set audio device input/output same as system default

Description
I’m looking at the available interfaces for audio devices and I’m confused how the “Same as System” default mic/speaker setting can be passed as a parameter to selectAudioDevice function call. For example, on the zoom client we have these settings:

If a user selects “Same as System”, how can we emulate that function call? I’m trying to use the following interface:

I’ve tried passing an empty string, nil, and “Same as System” as the DeviceID and DeviceName parameters but those don’t seem to work. How can we set the audio device to be the same as the system default?

Which version?
Most recent macOS SDK

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Attempt to use the selectAudioDevice interface to set the input device as the system default

Hi @nraj, thanks for the post.

The reason passing “Same as System” into this method doesn’t work is because this is functionality that is built into the default meeting UI. There is no audio input device on your machine with the name “Same as System”, unless you have explicitly named a device as such.

In order to achieve this behavior programmatically, you would need to find your system’s currently selected audio input and enter the name of that device into the method referenced in your post.

Thanks!

Hi @jon.lieblich,

Thank you for the holiday response! Yeah that makes sense, I coincidentally had just finished up implementing the approach you suggested shortly before you replied and it seems to work as expected.

The audio setting interface feels a little odd overall - for example, I can get the list of audio devices from the zoom SDK using [ZoomSDKAudioSetting getAudioDeviceList], and to determine that a user has the setting set to “Same as Default”, it appears the only indication is that none of the returned SDKDeviceInfo objects have isSelected set to True. This behavior combined with the selectAudioDevice behavior makes the audio setting interface a bit wonky to use, but does seem like there’s a path to achieving the desired functionality.

Anyway, appreciate the help!

Thanks,
Nitin

Hi @jon.lieblich,

As an aside, it would be a nice enhancement to be able to programmatically set the zoom setting to be the Same as System setting rather than choosing a specific device. This way in a custom UI app, we can mirror the same functionality as this menu in the zoom client UI:

I understand using the approach outlined above we can select the system default and find the system default, but it would be quite convenient to set the Zoom setting in this way such that Zoom automatically handles updating it’s audio devices when the system default changes.

Thanks!
Nitin

Hi @nraj,

I definitely understand that it would be great to have a convenience method to use the system audio device. It may be possible for us to add this ability in a future release, so I will submit a feature request on your behalf and let you know as soon as we have any updates.

Thanks!

Perfect, thank you @jon.lieblich!

Always happy to help!

If you run into any other issues, please don’t hesitate to reach out. :slightly_smiling_face:

Just to reiterate how useful a method to set devices back to system default would be - as a sligth point of semantics this would not be a convenience method as there is currently no way to set devices to system default via the SDK (while I can set to a device that is currently system default, this is not the same as setting to system default as it won’t follow the user’s changes to the system default device which is what would be most useful…)

1 Like

Hi @richard1,

Thank you for the insight. I will add your additional details to the feature request. Please keep an eye on our release notes for this feature to be added.

Thanks!