Refresh list of available audio devices
audiodevreset refreshes the list of available audio devices. Use
this function after adding or removing an audio device on your system.
Refresh List of Available Audio Devices
Show the available audio devices. Then, connect a device, refresh the list, and show the updated list.
View information about the input and output audio devices on the system by calling
audiodevinfo with no inputs.
returns a structure containing the two fields
info = audiodevinfo
info = struct with fields: input: [1×1 struct] output: [1×1 struct]
Show the names of the available output audio devices.
ans = 'Built-in Output (Core Audio)'
After plugging in an audio device, refresh the list of available devices and get information about all devices.
audiodevreset info = audiodevinfo
info = struct with fields: input: [1×1 struct] output: [1×2 struct]
Show the names of the available output audio devices again, including the new device.
ans = 'Built-in Output (Core Audio)' ans = 'HDMI (Core Audio)'
If you rename an audio device and then refresh the list of devices, the new name of the device does not appear in the list. Instead, its previous name is displayed. To update the name of the device in the list, you must start a new MATLAB® session.
audiodevresetin MATLAB Online™ and MATLAB Web App Server™ is supported in Google Chrome™.
Security Considerations When Using MATLAB Online or MATLAB Web App Server: When using
audiodevresetin MATLAB Online or MATLAB Web App Server, certain features and settings help you keep control of your privacy.
To reduce the likelihood of unwanted applications using your microphone, turn off automatic access to your audio device. You can change these settings at any time. After granting permission to a website once, your browser may be able to access your microphone automatically for that site on future visits. Use the browser settings for Google Chrome to revoke access for specific sites after you have initially allowed access.
You can also access the MATLAB Online website or MATLAB Web App Server using the private browsing mode in Google Chrome. When you do this, Chrome™ automatically asks you for permission to access your microphone every time you open the MATLAB Online site or MATLAB Web App Server and run
audiodevreset, regardless of your browser settings.
Introduced in R2020b