From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Measure voltage and USB microphone simultaneously

I have a usb mircophone in addition to a standard microphone wired into a standard NI pci board.  I realize that this is a weird setup, and that it is far from ideal.  Unfortunately, there are circumstances out of our control that are limiting us. Despite this fact, is there a way that I can record from both devices simultanesouly so that their time stamps match?  Presently, I'm using DAQ Express for the voltage measurement and Sound Input vi for the usb microphone.  I don't mind changing either of these.

 

I've had several thoughts about how to solve these:

1.  The only way I've found to read in from the USB microphone has been the sound input vi.  If DAQ Express could handle both, the problem would be resovled.

2.  The other way I thought of was to have both acquisition vi's in a while loop with the same settings and just 'hope' that they were recording simultaneously and that all the time measurements lined up, but I don't know if that'll happen.  

 

Thanks everyone!

0 Kudos
Message 1 of 2
(2,169 Views)

I doubt there is any way to get matching of the t0 timestamps to better than 10s of milliseconds on average and possibly >100s of ms occasionally. Why? Both the sound input and the USB port are controlled by the OS and LV cannot tell the OS what to do and when to do it. LV can only submit requests to the OS which determines priority and scheduling for those requests.

 

Is there some way you can create an acoustic signal which will reach both microphones simultaneously (or with known delay) and which will not interfere with the other measurements you need to make? A click or short tone burst, perhaps? Then you could locate that synchronizing signal in both data sets and align the timing from there.

 

Lynn

0 Kudos
Message 2 of 2
(2,155 Views)