LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can you identify available sound card inputs?

Solved!
Go to solution
The "Sound Input Configure.vi" requires a device ID number which seems arbitrary.  The express VI for sound cards, "Acquire Sound", somehow pulls a description of each input device available on the PC.  Is there any way to programmatically pull the name of the sound card (s) into a string for a distributed executable?  It's being done somehow in that express VI!
0 Kudos
Message 1 of 24
(7,375 Views)

Hi.

Take a look at this link. There is a vi to get info on input/output devices (id number and name):waveio

 

Cheers

Alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
Message 2 of 24
(7,361 Views)

hi there

 

you can use DirectX to get the list of all sound captures. see attachment (need DirectX8 installed on the system).

 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 3 of 24
(7,351 Views)

Hi Cris,

 

I've got DirectX10 and get an error message -2147221164?

 

What could be the problem? 

 

The vi should work for DirectX8 and higher, or?

 

Thanks!

0 Kudos
Message 4 of 24
(7,212 Views)

Hi there

 

the VI links IDirectX8:GetDSCaptureEnum. So you need DirectX8 installed on your system. I don't know if higher versions install the lower COM objects, but i don't think so. Try to re-link the Automation refnum to the V10 object and try again. Is there any error message delivered with the error code?

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 5 of 24
(7,188 Views)
I have DirectX 9 on my computer and the VI still works. However, DirectX 10 is a considerably different beast, so more than likely Chris is correct, and you should try relinking to the DirectX 10 COM object and see if the same properties and methods exist.
Message 6 of 24
(7,178 Views)

Ok, thank you guys!

 

I've got a Swedish Vista and the errormessage says "Klassen har inte registrerats
 in getSoundCaptures_DX8_LV7.1.vi"

I.e. the class is not registered.

 

Actually i'm looking for a generic way to find the soundcard inputs, and the tricky part is that it will be used in differet unknown Vista and XP DirectX versions.

 

Is there any hope for me?

 

When looking into the "Aquire Sound" Express VI you can actually read the sound card inputs and in the help it says that it needs DirectX8 or later.

However the proble is that i have not found any way to get this soundcard input info from this VI to my own front panel.

 

Any idea here is very welcome 🙂

 

Thanks again! 

0 Kudos
Message 7 of 24
(7,164 Views)

Dear All,

 

 

Do anyone has another method for detecting the differnet sound card on the PC.

 

Regards

0 Kudos
Message 8 of 24
(6,815 Views)
I am afraid the Express VI is the only VI that will give you the actual name.  The lower level VI's give you the option to address different VI's, if you have more than one.  What are you trying to accomplish?  Are you having problems getting the Express VI to work? 
Nick Keel
Product Manager - NI VeriStand and Model Interface Toolkit
National Instruments
0 Kudos
Message 9 of 24
(6,778 Views)
Solution
Accepted by topic author Jacer

The relevant VI that gets that information and populates that ring control is the following:

<labview directory>\vi.lib\sound2\_SoundAcquireConfig.llb\InitializeInputDeviceRing.vi

 

The two subVIs in there that are of use are "Get Num Devices" which gets the number of available devices, and  "Sound Device Info", which returns information on a device number. Both of these VIs are in the lvsound2 LLB that is in the sound2 directory. These two VIs can be used on their own. 

Message Edited by smercurio_fc on 07-06-2009 01:13 PM
Message 10 of 24
(6,770 Views)