LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 4801, but not using Vista and have mic plugged into jack.

Hi, i'm working on a project that involves inputing from a microphone, running it through a filter and then an FFT, and then doing some analysis on the data. For the input from the microphone, i'm having some issues. I basically drew all of the input functionality from the "Continuous Sound input.vi" example vi, which works on my computer, with a microphone and does display the signal. However, when i copied that over and modify it a little, the Sound read has either one of two errors. When i place the "Sound Clear" sub vi outside of the inner while loop, the Sound Read sub vi appears to have some sort of error relating to overflowing the buffer (i think 4822, but not 100%), no matter how low i put the samples/second and elapsed time function to exit the loop. If i put the Sound Clear sub vi INside the loop (not how it is in the continuous sound input vi, then i get error 4801, described here: 

 

[\Quote]

 

Error 4801 occurred at an unidentified location
Possible reason(s):
LabVIEW:  (Hex 0x12C1) Invalid sound task refnum.


What steps can I take to resolve this issue?

Solution: 
Error 4801 is given because the sound driver in Windows Vista disables the microphone and line-input jacks when it does not detect a source plugged into the jack.  The hardware is disabled by the Windows Operating System, not National Instruments software or drivers.  This behavior is not seen on XP computers, only on Vista.  

The resolution is to plug in a microphone or audio source to the computer.  Windows Vista will detect the microphone or audio source, and error 4801 will be resolved. 

 

[/endquote]

 

This seems very strange that i should recieve this error, as i am running win7, not vista, and have a microphone plugged in. The microphone jack is working - i've tested that with other programs and the continuous sound input.vi, so it works just fine. I just have no idea what to do at this point to fix the problem. My code is attached, Thanks for any assistance in advance!

 

0 Kudos
Message 1 of 2
(3,458 Views)

Hi ir0nsoul,

 

Thank you for the detailed explanation of your issue. To begin, the reason you are getting the overflow error is because the number of samples needs to be 1/10th of the sample rate. Next, you need to have the Sound Input Clear.vi outside of your while loop because you are clearing the task immediately after you read, so the next time it goes to read, it won't find the stream anymore. Finally, to see if Windows recognizes your microphone, use the Acquire Sound Express VI and check the drop down menu to see if your microphone is listed (use the device ID to set the control back in the Continuous Sound Input.vi). I suggest getting your microphone to work with the Continuous Sound Input.vi first and then add you modifications later. Hope this helps!

 

 

 

 

 

Aldo A
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,440 Views)