I have previously created a IWaveProvider to convert streaming Mulaw to PCM and play the audio back. I am now using the same provider to use a specific WaveFormat based on an RTSP describe value of L16/16000/2, which should be PCM 16 bit, 16000hz 2 channels.
So my WaveFormat is defined as follows:
waveFormat = new WaveFormat(16000,16,2);
When I use the AddSamples method, I am simply writing out the byte array directly to my circular buffer:
written = circularBuffer.Write(buffer, offset, count);
However, on playback, it is definitely not the correct format. Just wondering if I should be converting the incoming data before adding it to the circular buffer?