LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

microphone causes Labview to crash

We are using Labview 8.2.1 on Windows Vista.  We are trying to get labview to take data from the Microphone jack of the computer.  It will usually run for some amount of time ( between 100 and 500 seconds) and then labview will completely freeze and we have to go to program manager to end task.  We tried getting an error messages from Labview when it freezes, but the program never even returns an error.  Does anyone know what the problem could be?

We also tried it on an XP machine (laptop versus our desktop) and it does the samething.  Also, we did update to the newest version of DirectX, and it still has issues.
0 Kudos
Message 1 of 8
(3,437 Views)
Hi bockman,

There is a shipping example in "Help >> Find Examples..." that you should try.  You can search "sound" and there will be several examples of working with sound.  I have attached a VI that I think is relevant to you.  Do you still see the same behavior with this VI?

Thanks!
0 Kudos
Message 2 of 8
(3,406 Views)
I must admit I am new to labview.  I tried to run the vi, but it isn't actually collecting data from the microphone jack.  I only see bit noise when I view the data.  How to I modify it to collect data?

Also, here is the vi that I made that always crashes.  Any idea how to change it?
0 Kudos
Message 3 of 8
(3,396 Views)
I just tested the shipping example - you may want to troubleshoot your microphone by using the Sound Recorder utility.  You may find this by selecting "Run >> Accessories >> Entertainment >> Sound Recorder". 

Once you have verified your microphone, try it in LabVIEW.  The device should be device zero.  Try other device numbers if zero fails.  You should see it displaying on the graph on the front panel.  Once this works, you may go to the block diagram tools palette and select "Graphics & Sound >> Sound >> Files" for VIs to record data.

I will get back to you on your file that is crashing.
0 Kudos
Message 4 of 8
(3,375 Views)
I did use other software to confirm that the microphone works and we are getting data.

I found out that the microphone is device 2, so we changed that and it appears to work.  Just wondering, do you know why in the shipped example the vi freezes all the time, but the lower vi it seems not to crash?

-Dan
0 Kudos
Message 5 of 8
(3,363 Views)
Hi Dan,

I have witnessed the behavior you are describing.  Unfortunately it is difficult for me to troubleshoot because it is not happening deterministically so I can't narrow it down to a specific piece of functionality.  I will keep playing with it.
0 Kudos
Message 6 of 8
(3,348 Views)
Hi there, this is Martin, I am a coworker of Daniel at Physical Optics Corporation, working on the same project and dealing with the same problems. I've been playing around with that VI you sent us, and at least it doesn't really crash all the time. But there are still some issues. The biggest problem is, I just cannot change the sampling frequency. I ran it at a 22050 Hz with 16 bit of resolution, and this works pretty well. But when I change it to 44100 Hz, even with decreasing the resolution to 8 bit, it failes working. It seems to have problems with some numbers, even if the overall bitrate is decreased. It even stops working when I just set the resolution to 8 bit while keeping to the 22050 Hz of sampling rate. Do you have any explanation to this phenomenon? I would like to work with a sampling frequency of 44.1kHz and a resolution of 16 bit. How can I do that?
0 Kudos
Message 7 of 8
(3,322 Views)
I'm having problems with this VI too.  I will submit it to R&D.  As for a workaround, use the VI that I posted above - this doesn't require you to use an express VI.  There are also other examples of working with sound in the example finder in LabVIEW.
0 Kudos
Message 8 of 8
(3,303 Views)