/// <summary> /// Disposes this stream /// </summary> /// <param name="disposing">true if the user called this</param> protected override void Dispose(bool disposing) { if (disposing) { // Release managed resources. if (conversionStream != null) { conversionStream.Dispose(); conversionStream = null; } if (sourceStream != null) { sourceStream.Dispose(); sourceStream = null; } } else { System.Diagnostics.Debug.Assert(false, "WaveFormatConversionStream was not disposed"); } // Release unmanaged resources. // Set large fields to null. // Call Dispose on your base class. base.Dispose(disposing); }
/// <summary> /// Disposes this AudioFileReader /// </summary> /// <param name="disposing">True if called from Dispose</param> protected override void Dispose(bool disposing) { if (disposing) { readerStream.Dispose(); readerStream = null; } base.Dispose(disposing); }
/// <summary> /// Disposes this WaveStream /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (sourceStream != null) { sourceStream.Dispose(); sourceStream = null; } } else { System.Diagnostics.Debug.Assert(false, "BlockAlignReductionStream was not Disposed"); } base.Dispose(disposing); }