Hello to all readers, I have a burning question regarding an example program I changed a bit;
I read 9.000 samples/ch in the sound input config.
For some reason, before reading the input, this number gets halved, and I don't know what the significance of this is, why have 9.000 samples in the buffer if you're only going to read 4.500?
Thanks in advance.
LabVIEW version 2014 Student edition
Solved! Go to Solution.
My understanding from working with sound channels in LV is that the Device ID is acting as a buffer. allowing your while loop to be working on discrete chunks of channel audio a few milliseconds behind the input stream. By decreasing size of the audio block requested in each loop you reduce the chance of the main loop requesting a block of audio that hasn't been recorded yet.
You can see the results of removing the reduction step and running the Example VI. Intermittently the audio out or waveform display will 'clip' as it attempts to play audio that hasn't been written to the input Device ID channel.
If you want to delve REALLY DEEP you can check out the documentation for PortAudio which has more functionality but is structured similar to the LV audio implementation (hinting at what is going on under the hood in LabVIEW).
Lastly if you need more options for audio management I heartily recommend the WAVEIO plugg-in by Christian Zeitniz. It adds a lot of functionality like the WASAPI for audio which is a lot more robust.