audiodevinfo
Information about audio device
Syntax
Description
returns information about
the input and output audio devices on the system.info
= audiodevinfo
returns the version of the driver for the audio device specified by
DriverVersion
= audiodevinfo(IO
,ID
,"DriverVersion")ID
.
returns logical support
= audiodevinfo(IO
,ID
,Fs
,nBits
,nChannels
)1
(true
) if the input or output audio
device specified by ID
supports the sample rate, number of bits per
sample, and number of channels specified by the values of Fs
,
nBits
, and nChannels
, respectively, and logical
0
(false
) otherwise.
returns the device identifier of the first input or output device that supports the sample
rate, number of bits per sample, and number of channels specified by the values of
suppDevID
= audiodevinfo(IO
,Fs
,nBits
,nChannels
)Fs
, nBits
, and nChannels
,
respectively. If no supporting device is found, then suppDevID
is
-1
.
Examples
Input Arguments
Output Arguments
Limitations
These limitations apply when using
audiodevinfo
in MATLAB® Online™ or MATLAB Web App Server™:audiodevinfo
ignoresnBits
. For instance, when you callsupport = audiodevinfo(IO,ID,Fs,nBits,nChannels)
,audiodevinfo
returns a logical1
if the values ofFs
andnChannels
match a supported sample rate and number of channels of the audio device. It does not matchnBits
against the default number of bits per sample of the audio device.Similarly, when you call
suppDevID = audiodevinfo(IO,Fs,nBits,nChannels)
,audiodevinfo
returns information about an audio device if a supported sample rate and number of channels of the audio device match the values ofFs
andnChannels
. It does not matchnBits
against the number of bits per sample supported by the audio device."DriverVersion"
is not supported.
Tips
audiodevinfo
in MATLAB Online and MATLAB Web App Server is supported in Google Chrome®.Note
Security Considerations When Using MATLAB Online or MATLAB Web App Server: When using
audiodevinfo
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 every time it tries to access your microphone, regardless of your browser settings.
Version History
Introduced before R2006a