protected override void Dispose(bool disposing) { if (disposing) { _next.Dispose(); } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { _encoder.Dispose(); _next.Dispose(); //Try this } }
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(); } }
/// <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; }
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; } }