03-17-2010 07:40 PM - edited 03-17-2010 07:43 PM
I was getting buffer overflow problems when I foolishly used multiple "Capture Sound" Express VIs to listen to several mics and process them.
I then created a producer/consumer structure where I produced 2 signals (2 producer loops) and processed them in 1 loop. It worked great!
I expanded this idea today to 3 microphones (and hoped for more later). Trouble is I'm getting errors again. I can't quite explain the errors, so I've attached images (in sequence). By highlighting execution, it seemed the error happens on the SECOND iteration of the "Sound Input Read" in each of the 3 "Producer" loops.
I hope someone can shed light on this issue. Seems strange that it would work for 2 mics but not for 3.
I briefly tried playing with the sampling rates with no apparent results.
Solved! Go to Solution.
03-17-2010 07:44 PM
03-17-2010 08:42 PM
Now the strangest thing happened! It worked fine for about 5 seconds. After which I was tempted to stop and start again to see if it would work. Only to get the following error:
Could it be that there is some buffer that's getting cleared once in a while and allows the program to run for only some time before producing another error?
03-17-2010 10:30 PM - edited 03-17-2010 10:32 PM
I now think it's because the peak detector doesn't have enough samples in the first cycle. Therefore it causes the error. If you agree this is the error, how could I prevent this from happening? I tried adding a delay in the consumer loop, but I don't think that's the proper way of fixing this problem.
03-18-2010 08:52 AM
Could anyone shed some light?
The problem persists.
03-18-2010 04:34 PM
Hi ap,
You can use the First Call VI to tell whether a section of code has been run yet.
03-19-2010 07:31 AM