Exemple #1
0
 /// <summary>
 /// Dispose
 /// </summary>
 /// <param name="disposing">True if disposing (not from finalizer)</param>
 public void Dispose(bool disposing)
 {
     buf.ClearBuffer();
     if (windowsN)
     {
         buf.ClearBuffer();
     }
     else
     {
         dmoResampler?.Dispose();
         dmoResampler = null;
     }
 }
        /// <summary>
        /// Dispose
        /// </summary>
        public void Dispose()
        {
            if (audioClient != null)
            {
                Stop();

                audioClient.Dispose();
                audioClient  = null;
                renderClient = null;
            }
            if (resamplerDmoStream != null)
            {
                resamplerDmoStream.Dispose();
                resamplerDmoStream = null;
            }
        }