05-12-2015 11:50 AM
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
05-13-2015 11:08 AM
Hi Nickerbocker,
If you're using LabVIEW, you can use an Enum control and feed that to a case structure.
05-13-2015 01:20 PM
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!
05-14-2015 02:22 PM
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.
06-02-2015 03:31 AM
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
06-02-2015 04:51 AM
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
06-02-2015 09:33 AM - edited 06-02-2015 09:34 AM
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?