I think this is a mistake.
Disposing the sourceStream is not the responsibility of the WaveFormatConversionStream class.
I see no point in disposing a resource which was not created by the class itself.
For example: converting a stream to different formats or demultiplexing it succeeds first, then throwing NullReferenceException because sourceStream was disposed in the meantime.
Disposing the sourceStream is not the responsibility of the WaveFormatConversionStream class.
I see no point in disposing a resource which was not created by the class itself.
For example: converting a stream to different formats or demultiplexing it succeeds first, then throwing NullReferenceException because sourceStream was disposed in the meantime.