I have a problem with my project. I need to acquire sound from my soundcard (16 bit, 22050Hz) for later processing. I´m using a queue with consumer-producer structure. The thing is that I need to get a constant flow of 'sample packets' of 20ms length (441 samples) at the consumer loop and now data jerks every 1 second. I've posted a picture of my code. Any help will be welcomed.
OK, as the wait is only 1mS and the sample rate is 20mS and there is no dataflow between the aquire vi and the wait(ms) the wait will not have an affect on the timing. Unless the sound input dll is somehow blocking, but i doubt that. If you post the actual VI (in LV2011/12) I will run it and see what happens. I also suggest you put a tick count (ms) in the top loop and look at the itteration timing, this may help to identify the cause of the glitch.
Thank you for your quick answers. I have changed the timer values and now the flow is constant but the retardation in the consumer loop is too long for this real time project.
Ok, so the timer bit has helped. Its 2am here so i'll keep this quick. The file write is taking too long. maybe you could try writing the waveform to a binary file, i think that is fastest. Then write another vi to post-process the binary file to the correct sound file format. That is a bit more work but cheaper than a RAID array of SSD's
If this helps please mark as solution/kudos