From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using LabVIEW to test each speaker sperately

Hello, All.

 

I am using LabVIEW 2010 and I am trying to do what one might consider a simple audio test. I want to use LabVIEW to output WAV sound to one speaker at a time, but I have No experience handling this type of design and am not sure if LabVIEW can do it. I have used the "Sound File Read Simple" vi and the "Index Array" vi in hopes that this would help me select a particular speaker. It has not worked. I am using my desktop computer's sound card and speakers to develop this and although I have gotten sound out it is to both speakers, even if I index it for a specific one. Can anyone help me resolve this. I have very little background with WIN API also, so help with that may be in order as well. I know it is a lot, but I could sure use the help and it would be greatly appreciated.

 

Thanks.

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

This question has come up before several times. Did you try a search? Basically what you need to modify the array of 2 waveforms that are fed to the Sound Write VI by replacing the channel you want kept quiet with a waveform that consists of an array of all zeros. The order in which you populate the array dictates which speaker you hear the sound from.

0 Kudos
Message 2 of 5
(2,648 Views)

smercurio,

 

thanks for the quick response. What I have taken from your response is that after the data leaves the "Sound File Read Simple" vi, in its array form, I sould index that array and fill a particular array with zeros, when I want to hear the other speaker, then merge them back together and let that be the intput data to the "Sound Output Write" vi? Please let me know if I am on the right track with understanding your response. Also, I did try a search fro that topic, but came back empty. I will try again, but if you are able to obtain a link to those previous responses could you pass them on. I appreciate the help thus far.

 

Thanks.

0 Kudos
Message 3 of 5
(2,640 Views)

That's pretty much correct. Here is an example: http://forums.ni.com/t5/LabVIEW/Split-audio-into-left-and-right-channel/m-p/1648346#M591289.

 

Attached is a modification of the shipping example "Sound File to Sound Output" that does this.

0 Kudos
Message 4 of 5
(2,632 Views)

smercuio,

 

you have been an enormous help. I believe I have it now. I could not have done it so quickly without your help. Many many thanks.

0 Kudos
Message 5 of 5
(2,629 Views)