Audio capture to WAV file
Products: Video Capture SDK .Net
WAV, short for Waveform Audio File Format, is a standard for storing audio on PCs. It's a variant of the RIFF bitstream format and typically uses linear pulse-code modulation (PCM) for uncompressed audio. WAV is known for its high quality, making it popular for professional audio applications but resulting in large file sizes.
Sample code
Get a list of available audio codecs.
foreach (var codec in VideoCapture1.Audio_Codecs)
{
cbAudioCodecs.Items.Add(codec);
}
Set audio settings and apply output format.
var acmOutput = new ACMOutput();
acmOutput.Channels = 2;
acmOutput.BPS = 16;
acmOutput.SampleRate = 44100;
acmOutput.Name = "PCM"; // codec name
VideoCapture1.Output_Format = acmOutput;
Set the audio capture mode.
VideoCapture1.Mode = VideoCaptureMode.AudioCapture;
Set the file name.
VideoCapture1.Output_Filename = "output.wav";
Start capture (sync or async).
await VideoCapture1.StartAsync();
Required redists
Visit our GitHub page to get more code samples.