05-16-2023 08:57 PM
I'm using the sound input VIs to record audio data from an input device (like microphone or line in). For convenience, I want to control the audio device input level (accessible in the Windows sound settings) via Labview:
Is there a way to access the recording/input volumes of Windows audio devices in Labview, maybe via a system dll or a .NET class available in Labview?
Solved! Go to Solution.
06-01-2023 02:57 PM
Hi,
You should take a look on this project : GitHub - dataflowg/g-audio: A LabVIEW audio library.
Loïc
06-09-2023 11:06 PM - edited 06-09-2023 11:08 PM
Thanks for the recommendation! I've looked into it and it's a really comprehensive audio library for Labview, but unfortunately it has a crucial flaw in how it handles input device volume. Apparently the volume is set after the capture and does not affect the actual input device pre-amp like the Windows record level volume does (the one I showed in the screenshot). That means if the pre-amp value (i.e. record level) is too high, the audio is clipped, and reducing the input volume through that audio library only scales down the already clipped audio. In contrast, using the Windows record level control reduces the actual pre-amp value in the driver and avoids clipping.
So what I need is a method to control the record level pre-capture, not scale the data post-capture.
06-11-2023 12:13 PM
06-12-2023 03:32 AM
Thanks for the feedback. The RecVolume function in the WaveIO.dll does exactly what I was looking for (controlling the record level via the Windows API). Strange that the miniaudio library which you use in your G-audio implementation doesn't support that (apparently) - I guess that's a limitation of being cross-platform.