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 machine.
Refresh List of Available Audio Devices
Show the available audio devices. Then, connect a device, refresh the list, and show the updated list.
audiodevinfo with no inputs to view information about the
input and output audio devices on a system.
audiodevinfo returns a
structure containing 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 before refreshing the list of devices, the new name of the device will not appear in the list. Instead, its previous name will be displayed. To update the name of the device in the list, you must start a new MATLAB® session.
Security Considerations When Using MATLAB Online or MATLAB Web App Server
audiodevreset in 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 the MATLAB
Web App Server and run
audiodevreset, regardless of your browser
Audio playback in MATLAB Online and MATLAB Web App Server are supported in Google Chrome™.