Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

audiodevinfo - Information about audio device

Syntax

devinfo = audiodevinfo
devs = audiodevinfo(IO)
name = audiodevinfo(IO, ID)
ID = audiodevinfo(IO, name)
DriverVersion = audiodevinfo(IO, ID, 'DriverVersion')
ID = audiodevinfo(IO, rate, bits, chans)
doesSupport = audiodevinfo(IO, ID, rate, bits, chans)

Description

devinfo = audiodevinfo returns a structure, devinfo, containing two fields, input and output. Each field is an array of structures, with each structure containing information about one of the audio input or output devices on the system. The individual device structure fields are:

devs = audiodevinfo(IO) returns the number of input or output audio devices on the system. Use an IO value of 1 to indicate input, and an IO value of 0 to indicate output.

name = audiodevinfo(IO, ID) returns the name of the input or output audio device identified by device ID.

ID = audiodevinfo(IO, name) returns the device ID of the input or output audio device identified by the given name (partial matching, case sensitive). If no audio device is found with the given name, -1 is returned.

DriverVersion = audiodevinfo(IO, ID, 'DriverVersion') returns a string indicating the driver version of the specified audio input or output device.

ID = audiodevinfo(IO, rate, bits, chans) returns the device ID of the first input or output device that supports the sample rate, number of bits, and number of channels specified by the values of rate, bits, and chans, respectively. If no supporting device is found, -1 is returned.

doesSupport = audiodevinfo(IO, ID, rate, bits, chans) returns 1 or 0 for whether or not the input or output audio device specified by ID can support the given sample rate, number of bits, and number of channels.

See Also

audioplayer, audiorecorder

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS