feat: disconnect devices on app background mobile
This commit is contained in:
@@ -69,8 +69,15 @@ pub fn create_dsp408(
|
||||
let id = *next_id;
|
||||
*next_id += 1;
|
||||
|
||||
#[cfg(mobile)]
|
||||
let mut device = DSPDevice { dsp };
|
||||
|
||||
#[cfg(not(mobile))]
|
||||
let device = DSPDevice { dsp };
|
||||
|
||||
#[cfg(mobile)]
|
||||
device.dsp.set_auto_reconnect(false);
|
||||
|
||||
let mut devices = state.devices.lock().map_err(|e| e.to_string())?;
|
||||
|
||||
devices.insert(id, Arc::new(Mutex::new(device)));
|
||||
|
||||
Reference in New Issue
Block a user