LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get a List of Attached Microphones for Sound Acq

Hi!

 

I don't want to use the Express VI, I want to provide an interface for my end user so that they can select the microphone they would like to use. Any solutions on getting a useful list from Windows instead of playing a guessing game with Device ID integers?

 

Thanks,

Nickerbocker

0 Kudos
Message 1 of 7
(3,697 Views)

Hi Nickerbocker,

 

If you're using LabVIEW, you can use an Enum control and feed that to a case structure.

Message 2 of 7
(3,650 Views)

Thank you for the reply. I'm trying to utilize the microphones connected to a Windows based PC. The end-users configuration is unknown to me. I need the user to be presented with a list of microphones connected to the PC so that they can select the one they want to use and the correct Device ID integer value is passed to the "Sound Input Configure.vi" in my code.

 

The Acquire Sound Express VI brings up a nice easy-to-use wizard that has a enum populated with my current system microphones. I'd like to make a similar enum for my end user. Do you know how I might accomplish that?

 

Thanks!

0 Kudos
Message 3 of 7
(3,636 Views)

Did the Enum automatically populate with the microphones you have connected? If you're not sure, disconnect one and see what your options are the next time you run the VI.

0 Kudos
Message 4 of 7
(3,612 Views)

Hi,

 

I believe there should be a dll call that gives such a list. I am also trying to find it. If anyone knows this dll call thank you for providing it.

 

M-Junior

0 Kudos
Message 5 of 7
(3,516 Views)

I have found it, you have to use the library lvsound2.llb that calls the lvsound2.dll :

 

C:\Program Files (x86)\National Instruments\<LabVIEW version>\vi.lib\sound2

 

- Get Num Devices.vi : List the number of audio devices connected to the PC (I/O)

- Sound Device Info.vi :Give the name of a device according to its index

It works for me!

 

Have a nice day,

M-Junior

0 Kudos
Message 6 of 7
(3,505 Views)

Hi Marc-junior and Nickerbocker,

 

I'm glad you found the solution. I also found this KnowledgeBase article, outlining the solution in more detail. 

 

How Can I Programmatically View a List of Audio Input/Output Devices by Name in LabVIEW?

0 Kudos
Message 7 of 7
(3,492 Views)