feat: add recall preset
This commit is contained in:
@ -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())
|
||||
})
|
||||
}
|
||||
@ -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!())
|
||||
|
||||
Reference in New Issue
Block a user