I am trying to convert a WAV file (PCM, 48kHz, 4-Channel, 16 bit) to single-channel WAV files.
I tried splitting the WAV file into 4 byte arrays, like, and created a WaveMemoryStream, as shown below, but it doesn't work.
byte[] chan1ByteArray = new byte[channel1Buffer.Length]; Buffer.BlockCopy(channel1Buffer, 0, chan1ByteArray, 0, chan1ByteArray.Length); WaveMemoryStream chan1 = new WaveMemoryStream(chan1ByteArray, sampleRate, (ushort)bitsPerSample, 1);
Am I missing something in creating WAVE headers? Or is there more to split WAV into files with mono-channel WAV?
source share