LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

recording multiple audio files

Hi,

 

Is it possible to have a program that will record separate audio files every time the user presses stop and save? Would the solution for this be a state machine...? How could I update the Sound File Open and Output Configure VI's if they are outside the while loop? I am guessing that I could implement this by putting the state machine within another while loop?

 

Anton

0 Kudos
Message 1 of 5
(2,786 Views)

Assuming that you only want to record a single file at a time...

 

State machine with 4 states - idle, start, read and stop. When you press the start button you go from idle to start and start the sound acquisition. Then you stay in the read case - reading the samples and writing to the file (possibly using producer/consumer architecture with a queue) until the user presses the stop button where you go into the stop case to stop acquiring the sound data and go back to the idle case.

 

You could use an event structure to process the button presses.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 5
(2,783 Views)

Would the Configuration and Sound File Open VI's be within the state machine or outside of it?

0 Kudos
Message 3 of 5
(2,768 Views)

I would put them inside - either in a seperate initialise case (for loading configuration) or in your start case (for configuring/starting a new sound file).


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 5
(2,760 Views)

I have tried this out and I am running into an error where I get "Error 42 occurred at Sound File Write Open" and then it is stuck in this error. I have to hit the stop execution button to get out of this cycle. Is this an error cause by one of the values I am passing to the shift registers.

 

I have attached my sample vi and there are some notes in there.

 

Thanks for your help

0 Kudos
Message 5 of 5
(2,735 Views)