feat: custom input formatting + custom step

This commit is contained in:
2026-08-10 15:29:18 +02:00
parent ee3f56fcdf
commit 0f66ed72f4
16 changed files with 975 additions and 74 deletions
+61 -1
View File
@@ -400,4 +400,64 @@ pub async fn set_geq_bypass(
.set_geq_bypass(input_channel, bypass)
.map_err(|e| e.to_string())
})
}
}
#[tauri::command]
pub async fn set_low_pass(
state: State<'_, AppState>,
id: u64,
channel: types::Channel,
freq: f32,
filter_type: types::CrossoverFilter,
) -> Result<bool, String> {
state.with_device_mut(id, |device| {
device
.dsp
.set_low_pass(channel, freq, filter_type)
.map_err(|e| e.to_string())
})
}
#[tauri::command]
pub async fn set_high_pass(
state: State<'_, AppState>,
id: u64,
channel: types::Channel,
freq: f32,
filter_type: types::CrossoverFilter,
) -> Result<bool, String> {
state.with_device_mut(id, |device| {
device
.dsp
.set_high_pass(channel, freq, filter_type)
.map_err(|e| e.to_string())
})
}
#[tauri::command]
pub async fn set_peq_band(
state: State<'_, AppState>,
id: u64,
channel: types::Channel,
band: types::PEQBand,
gain_db: f32,
freq_hz: f32,
q: f32,
filter_type: types::PEQFilter,
bypass: bool,
) -> Result<bool, String> {
state.with_device_mut(id, |device| {
device
.dsp
.set_peq_band(
channel,
band,
gain_db,
freq_hz,
q,
filter_type,
bypass,
)
.map_err(|e| e.to_string())
})
}
+3
View File
@@ -29,6 +29,9 @@ pub fn run() {
commands::set_matrix_gain,
commands::set_geq_band,
commands::set_geq_bypass,
commands::set_low_pass,
commands::set_high_pass,
commands::set_peq_band,
]
)
.run(tauri::generate_context!())