I have a task for work, I need to convert a local .wav file into 2 separate PCM files.
I have managed to read the file into a WavStream or into a Byte[] but have no knowledge on how to convert each channel to a separate file, without losing the headers.
Sample Code will be highly appreciated.
Thanks,
Nokky.
P.S
This is the code I used.
public void WavToPcmConvert(string filePath)
{
string fileName = Path.GetFileNameWithoutExtension(filePath);
using (var reader = new WaveFileReader(filePath))
{
using (var converter = WaveFormatConversionStream.CreatePcmStream(reader))
{
WaveFileWriter.CreateWaveFile(, converter);
}
}
}