LabVIEW

cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

audio output error

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 

Regards
Download All
0 Kudos
Message 1 of 20
(4,114 Views)

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

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 2 of 20
(4,084 Views)
hi BCho i read the manual and it said "This VI is necessary only if Sound Input Stop has previously been called." since my code is in the while loop and the sound input stop is only called when i stop the loop. although i did try my code as you said but the same error is coming?? any help thnx
Regards
0 Kudos
Message 3 of 20
(4,068 Views)

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



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 20
(4,069 Views)

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

Regards
0 Kudos
Message 5 of 20
(4,053 Views)
What do you mean by bitstream? Your sound card may have 16 or 24 bit resolution. Do you want to convert the sound card output to say 8 bit resolution and then send it to a speaker?


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 6 of 20
(4,044 Views)

Hi friends

 

I am Joseph from London. I think you should check the audio/video file format.

 

Joseph

 

0 Kudos
Message 7 of 20
(4,042 Views)

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..

 

 

 

Regards
0 Kudos
Message 8 of 20
(4,025 Views)
could you send me a vi containing an example of the the modulation toolkit block. I need it to better understand your problem.  


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 9 of 20
(4,020 Views)

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

Hope this helps.
-Ben

WaterlooLabs
0 Kudos
Message 10 of 20
(4,005 Views)