Home > Forum > Refresh available audio sources

Refresh available audio sources

Jan 30, 2023
tambi wrote
I have a problem with refreshing audio sources. If i plug an extra audio source and i refresing my combobox with ManagementObjectSearcher("SELECT * FROM Win32_SoundDevice"); elements, the device source will be the "VisioForge what you hear source", not the new audiodevice.

Is there any way to refresh the VideoCapture.Audio_CaptureDevices() list when the application is running?
Reply
2 Answers
Jan 30, 2023
Roman Miniailov agent wrote
Hi

You can use OnDeviceAdded/OnDeviceRemoved events to catch when device added or removed.

Before Audio_CaptureDevices() call please call VideoCapture1.RefreshLists() method to update devices.
Jan 30, 2023
tambi wrote
RefreshLists() solved it, thank you!