/// <summary> /// Stops playing back audio. /// </summary> public void Stop() { if (this.audioDevice != null) { LinuxAudioInterop.Close(this.audioDevice); this.audioDevice = null; } }
/// <summary> /// Stops playing back audio. /// </summary> private void OnPipelineStop() { if (this.audioDevice != null) { LinuxAudioInterop.Close(this.audioDevice); this.audioDevice = null; } }
/// <summary> /// Stops playing back audio. /// </summary> private void OnUnsubscribed() { if (this.audioDevice != null) { LinuxAudioInterop.Close(this.audioDevice); this.audioDevice = null; } }
/// <summary> /// Called when the pipeline is shutting down. /// </summary> public void Stop() { var audioDevice = Interlocked.Exchange(ref this.audioDevice, null); if (audioDevice != null) { LinuxAudioInterop.Close(audioDevice); } }
/// <summary> /// Called when the pipeline is shutting down. /// </summary> private void OnPipelineStop() { var audioDevice = Interlocked.Exchange(ref this.audioDevice, null); if (audioDevice != null) { LinuxAudioInterop.Close(audioDevice); } }
private void Stop() { // stop any running background thread and wait for it to terminate this.isStopping = true; this.background?.Join(); var audioDevice = Interlocked.Exchange(ref this.audioDevice, null); if (audioDevice != null) { LinuxAudioInterop.Close(audioDevice); } }