Clear Filters
Clear Filters

How can one recognize a digital audio interface name /vendor (USB digital audio)?

10 views (last 30 days)
I tried to use 'audiodevinfo' as follows
myDevice = audiodevinfo;
nInputs = audiodevinfo( 1 );
nOutputs = audiodevinfo( 0 );
inName = myDevice.input.Name;
inID = myDevice.input.ID;
inVER = myDevice.input.DriverVersion;
outID = myDevice.output.ID;
OutName = myDevice.output.Name;
OutVER = myDevice.output.DriverVersion;
but no matter what USB digital audio interface I connect I got
myDevice.output.Name = myDevice.input.Name = 'Primary Sound Capture Driver (Windows DirectSound)'
myDevice.output.DriverVersion = myDevice.input.DriverVersion =
='Windows DirectSound'.
I expect to get the name back something seen in the PC Device-Manager List, such as 'USB One' or 'Komplete 6 Audio'.
Two digital audio devices I connected are 'USB One' and 'Komplete 6 Audio', respectively.
Komplete 6 Audio is a digital audio interface with 24 bits/96000 Hz, 5 analog inputs and 5 analog outputs
And 'USB One' is a digital audio interface with 24/bits/48000Hz, 2 analog inputs and 2 analog outputs.
Eventually, I want to display the device connected to the PC via USB, so that the user knows his/her device connected to the PC is working for the job.

Accepted Answer

Dinesh Iyer
Dinesh Iyer on 3 Aug 2015
Hi Ning,
The function audiodevinfo does list the device names.
Can you confirm that you are able to use these devices outside of MATLAB? Try to playback audio using media player or youtube and check if you can hear audio out of these devices?
One thing is that audiodevinfo does not refresh the list of devices automatically. If you plugin in new devices after u have started MATLAB, you might have to restart it.
I tried the following on my system and it worked:
info = audiodevinfo;
Sample output:
'Primary Sound Capture Driver (Windows DirectSound)'
'Microphone (2- Logitech Mic (Communicate STX)) (Windows DirectSound)'
'Microphone (2- Logitech H360 Headset) (Windows DirectSound)'
'HP 4120 Microphone (HP 4120) (Windows DirectSound)'
'Microphone (Realtek High Definition Audio) (Windows DirectSound)'

More Answers (2)

Ning Xiang
Ning Xiang on 3 Aug 2015
Dinesh, thanks for the quick answer! It's a problem of the system updating. But when I plug-in an audio interface 'USB One', the output looks like:
'Primary Sound Capture Driver (Windows DirectSound)' 'Line Input (USB One) (Windows DirectSound)' 'Microphone (Realtek High Definition Audio) (Windows Di...' 'Chinch (USB One) (Windows DirectSound)' 'Optical (USB One) (Windows DirectSound)'
which means in my application, I have to use a string search to find the interface Identifier/name: in this case USB One. There is no direct way to let audiodevinfo to output this identifier. E.g. next time I may plug-in another device called Komplete 6 Audio!

Dinesh Iyer
Dinesh Iyer on 4 Aug 2015
audiodevinfo can output the name of the device if you give it a a device ID. However, the only way you get the device ID is if you look at the output of audiodevinfo and search for the device ID by the device name as the device ID value cannot be independently obtained.
So looks like you have to have a way of tracking which device you are plugging in.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!