feat: custom input formatting + custom step
This commit is contained in:
@@ -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())
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user