feat: add keep alive

This commit is contained in:
2026-07-26 17:56:25 +02:00
parent a157b5f198
commit 31f645ebb2
21 changed files with 1207 additions and 263 deletions

View File

@ -203,4 +203,33 @@ pub async fn set_channel_inverse_gain(
Ok(r)
})
}
}
#[tauri::command]
pub async fn recall_preset(
state: State<'_, AppState>,
id: u64,
preset_index: usize,
) -> Result<bool, String> {
state.with_device_mut(id, |device| {
let success = device
.dsp
.recall_preset(preset_index)
.map_err(|e| e.to_string())?;
Ok(success)
})
}
#[tauri::command]
pub async fn get_meter_levels(
state: State<'_, AppState>,
id: u64,
) -> Result<dsp_thomann::dsp408::types::Meters, String> {
state.with_device_mut(id, |device| {
device
.dsp
.get_meter_levels()
.map_err(|e| e.to_string())
})
}

View File

@ -16,7 +16,9 @@ pub fn run() {
commands::get_dsp_state,
commands::set_channel_gain,
commands::set_mute,
commands::set_channel_inverse_gain
commands::set_channel_inverse_gain,
commands::recall_preset,
commands::get_meter_levels,
]
)
.run(tauri::generate_context!())