예제 #1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _next.Dispose();
     }
     base.Dispose(disposing);
 }
예제 #2
0
        protected override void Dispose(bool disposing)
        {
            base.Dispose(disposing);

            if (disposing)
            {
                _encoder.Dispose();
                _next.Dispose();  //Try this
            }
        }
예제 #3
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         _disposeTokenSource?.Cancel();
         _disposeTokenSource?.Dispose();
         _cancelTokenSource?.Cancel();
         _cancelTokenSource?.Dispose();
         _queueLock?.Dispose();
         _next.Dispose();
     }
     base.Dispose(disposing);
 }
    public void Dispose()
    {
        stop = true;
        while (IsLoading)
        {
            ;
        }

        if (audioStream != null)
        {
            audioStream.Dispose();
        }
    }
예제 #5
0
        /// <summary>
        /// Closes the <see cref="SoundIoAudioTrack"/>
        /// </summary>
        public void Close()
        {
            if (AudioStream != null)
            {
                AudioStream.Pause(true);
                AudioStream.Dispose();
            }

            m_Buffer.Clear();
            OnBufferReleased();
            ReleasedBuffers.Clear();

            State          = PlaybackState.Stopped;
            AudioStream    = null;
            BufferReleased = null;
        }
예제 #6
0
 protected override void Dispose(bool disposing)
 {
     base.Dispose(disposing);
     if (!disposedValue)
     {
         if (disposing)
         {
             project.OnEffectsStatusChanged -= project_OnEffectsStatusChanged;
             project.Dispose();
             audio.Dispose();
         }
         project       = null;
         audio         = null;
         disposedValue = true;
     }
 }