ā02-20-2009 07:06 AM
hi all plz see my example i am encountring an error (bmp attached). Error is "a task must be running to perform the operation". actually what i am trying to do is , get an audio signal from microphone,converting it to bitstream then back to audio (see the attached example) i think the error is coming from the sound output write.vi and the error is still there even if i change the timeout value to -1 still it get the same error.
thnx
ā02-23-2009 03:49 PM
Hey nolsqn,
I noticed in your code that you forgot to include a "Sound Input Start.vi" before you started aquiring your sound signal. Check out this LabVIEW manual for more information on the Sound Inpurt Start.vi. You should place this vi after your Sound Input Configure.vi and before your while loop.
Hope this helps.
Ben
Applications Engineering
National Instruments
ā02-24-2009 01:15 AM
ā02-24-2009 02:08 AM
I think your problem is that the sound card input buffer gets overflowed. But your code is also strange I think it do not work. Do you want to take a 16 bit input signal convert it to 8 bit and then put it on a speaker? This can be done much simpler

ā02-24-2009 11:11 PM
hey hi t06afre...can you tell me any way to incease the buffer size ? ..and what do you mean that it is strange code do you know any better way to convert an audio signal to bitstream??
thnx
ā02-25-2009 01:43 AM

ā02-25-2009 01:55 AM
Hi friends
I am Joseph from London. I think you should check the audio/video file format.
Joseph
ā02-25-2009 04:29 AM
by bitstream i mean a bunch of 1's and 0's.....i convert the 16 bit or 8 bit into 1's and 0's ...since i need to do modulation and demod ...and the modulation toolkit block takes input inform of bitstream..
ā02-25-2009 05:28 AM

ā02-25-2009 09:03 AM
Hey nolsqn,
t06afre is right in that is seems that you are getting a buffer overflow error. One way to work around this is to decrease the sampling rate or increase the number of samples per channel. If you right click on the Sound Input Configure vi you can find and example code on continuously acquiring sound. Maybe this will help. Another crude work around is to include the configure and the close within the while loop. Though this is generally not a good idea and you may start loosing samples, the Sound Input Clear vi does clear the buffer.
Hope this helps.
-Ben