LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview&sound card output channel

I encountered a problem when using software to control the sound card. The VI routine currently used cannot control the output waveform of channels other than dual channels. After all, my sound card has 8 output channels that can be called by me, but I can only use the first two. What is the reason? How to control the multi-channel output waveform or sound of the sound card? Is there any corresponding information or VI for me to learn from?Please help me,thanks。

0 Kudos
Message 1 of 5
(1,822 Views)

I believe (but am not 100% certain) that LabVIEW uses the Microsoft DirectX system for handling the Sound Card.  As PCs generally come with 2 channels of "sound", typically running (I think) at 44.1 kHz, that is what the LabVIEW Sound VIs support.

 

What kind of Sound Card are you using?  Does it come with its own Driver software?  Is there an API for it that you could use?  [With more information such as this, we might be able to provide additional suggestions ...].

 

Bob Schor

0 Kudos
Message 2 of 5
(1,785 Views)

Hi,

 

In the example VI you attached, the sound device is only configured with 2 channels. So first thing to do is increase Number of Channels to 8 (it's possible you tried this, but the value wasn't set default).

 

The second thing to do is make sure you're writing 8 channels to the output device. The example VI includes waveform generation of 2 channels, which are then built into a 2 element waveform array and output to the sound device. This will need to be increased to 8 channels. As a quick test to verify 8 channel output works, you can build an 8 element array with the 2 waveform inputs like this:

labview sound for eight.png

 

Another thing to check is that the sound device in Windows is configured for 8 channels (a 7.1 speaker configuration):

Dataflow_G_0-1646097996163.png

 

Some sound cards have the option of configuring the outputs as a single device with multiple channels (1 device with 8 channels), or as multiple devices with 2 channels each (4 devices with 2 channels each). If your card is capable of both options, check that it's configured as a single device with multiple channels.

 

There's every chance the LabVIEW / DirectX combination isn't playing nicely with the extra features of your card. In that case you can try using Windows' WASAPI audio backend. This requires a third party audio library for LabVIEW, such as G-Audio (written by me) or WaveIO. Assuming you have LabVIEW 2019, give WaveIO a go (as G-Audio only supports LabVIEW 2020+).

0 Kudos
Message 3 of 5
(1,775 Views)

I use the AIO test system (model: aio-2). I can only identify two corresponding output channels when calling through program selection. I suspect it is lvsound under win system There is a problem with the DLL program, because when I use the same program on the Mac computer, it can read all the corresponding channels, but I have no direction to prove that what I suspect is right. Excuse me, are you calling lvsound DLL file, or does AIO sound card not apply to win system or need additional settings,

The sound card here should be 4 channels

 

 

0 Kudos
Message 4 of 5
(1,745 Views)

I used LabVIEW's sample program, but it still can't read channels beyond two channels. When I force 4 channels (LabVIEW can only recognize two channels in my program at present), it will give me an error and tell me that the sound card doesn't support this setting

0 Kudos
Message 5 of 5
(1,744 Views)