LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronised Simultaneous Sound-Card I/O - Fix my VI Please

Hi,

 

I appreciate that this topic has been discussed several times before in this forum, but I am unable to find any answers that help me as yet.

 

I need to do the opposite of what the Simultaneous Sound IO example VI does. The example acquires audio from the input, and plays it out of the output. I need to send synthesized data to the output of my sound card, whilst at exactly the same time acquiring data from my sound card's input.

 

I've made a VI that does this, based on the example VI, but it doesn't seem to work quite right. The VI creates a sine wave, splits it into chunks, and send the chunks (the size of which is specified as a buffer size) one by one to the output. This works fine and smoothly in real time if the buffer size is set right. At the same time it acquires data in the same size chunks from the input, and saves them to an array. And it all seems fine.

 

However, if I use a loudspeaker and microphone for output and input respectively, and face them opposite each other so that I am now acquiring the whole system's response to a the sine wave, then a delay is visible as the start of the acquired waveform before the sine wave, as if the sine wave didn't start playing until some time after the acquisition started. This delay is definitely longer than the time taken for the sound to travel from the loudspeaker to the microphone.

 

Is there a way to synchronise precisely when two VIs execute? I need to be sure the acquisition and output happen at exactly the same time.

 

I've attached my VI.

 

Thanks,

Christian 

Message Edited by crnbaker on 05-19-2010 07:32 AM
0 Kudos
Message 1 of 2
(2,640 Views)
Synchronizing of the sound input and output can not be done very accurate with a sound card and the Labview sound system. However if you only use mono input. You could use the free channel to record the reference signal. The measurement and reference signal will be very tight related to each other. What are you trying do with your setup? 


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 2
(2,617 Views)