diff --git a/crates/tek_core/src/audio.rs b/crates/tek_core/src/audio.rs index 8645cad1..23aa5011 100644 --- a/crates/tek_core/src/audio.rs +++ b/crates/tek_core/src/audio.rs @@ -9,7 +9,11 @@ pub trait Audio { fn callback( state: &Arc>, client: &Client, scope: &ProcessScope ) -> Control where Self: Sized { - state.write().unwrap().process(client, scope) + if let Ok(mut state) = state.write() { + state.process(client, scope) + } else { + Control::Quit + } } }