feat: disconnect dsps on window close
This commit is contained in:
@@ -18,4 +18,16 @@ impl AppState {
|
||||
next_id: Mutex::new(1),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn shutdown(&self) {
|
||||
let devices = self.devices.lock().unwrap();
|
||||
|
||||
for device in devices.values() {
|
||||
if let Ok(mut device) = device.lock() {
|
||||
if device.dsp.connected() {
|
||||
let _ = device.dsp.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user