feat: add recall preset

This commit is contained in:
2026-07-27 19:13:52 +02:00
parent 31f645ebb2
commit da322c9df1
8 changed files with 317 additions and 195 deletions

View File

@ -233,3 +233,17 @@ pub async fn get_meter_levels(
.map_err(|e| e.to_string())
})
}
#[tauri::command]
pub async fn set_current_preset_name(
state: State<'_, AppState>,
id: u64,
name: String,
) -> Result<bool, String> {
state.with_device_mut(id, |device| {
device
.dsp
.set_current_preset_name(&name)
.map_err(|e| e.to_string())
})
}

View File

@ -19,6 +19,7 @@ pub fn run() {
commands::set_channel_inverse_gain,
commands::recall_preset,
commands::get_meter_levels,
commands::set_current_preset_name,
]
)
.run(tauri::generate_context!())