feat: add compressor + fix ui for all sections
This commit is contained in:
@@ -265,3 +265,29 @@ pub async fn set_gate(
|
||||
.map_err(|e| e.to_string())
|
||||
})
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn set_compressor(
|
||||
state: State<'_, AppState>,
|
||||
id: u64,
|
||||
channel: types::OutputChannel,
|
||||
ratio: types::Ratio,
|
||||
attack: u16,
|
||||
release: u16,
|
||||
knee: u16,
|
||||
threshold: f32,
|
||||
) -> Result<bool, String> {
|
||||
state.with_device_mut(id, |device| {
|
||||
device
|
||||
.dsp
|
||||
.set_compressor(
|
||||
channel,
|
||||
ratio,
|
||||
attack,
|
||||
release,
|
||||
knee,
|
||||
threshold,
|
||||
)
|
||||
.map_err(|e| e.to_string())
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user