quit jack loop on PoisonError

This commit is contained in:
🪞👃🪞 2024-11-01 15:43:23 +02:00
parent 21b08bf3df
commit a305ba3cc1

View file

@ -9,7 +9,11 @@ pub trait Audio {
fn callback(
state: &Arc<RwLock<Self>>, 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
}
}
}