engine: stop jack processing on mutex poison

This commit is contained in:
🪞👃🪞 2025-05-09 21:37:52 +03:00
parent 419a07de8c
commit 75f8fd8746

View file

@ -85,7 +85,11 @@ impl Jack {
// implements audio and MIDI input and output on a realtime basis. // implements audio and MIDI input and output on a realtime basis.
ClosureProcessHandler::new(Box::new({ ClosureProcessHandler::new(Box::new({
let app = app.clone(); let app = app.clone();
move|c: &_, s: &_|app.write().unwrap().process(c, s) move|c: &_, s: &_|if let Ok(mut app) = app.write() {
app.process(c, s)
} else {
Control::Quit
}
}) as BoxedAudioHandler<'j>), }) as BoxedAudioHandler<'j>),
)?; )?;
*self.state.write().unwrap() = Active(client); *self.state.write().unwrap() = Active(client);