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())
|
||||
})
|
||||
}
|
||||
@@ -21,6 +21,7 @@ pub fn run() {
|
||||
commands::get_meter_levels,
|
||||
commands::set_current_preset_name,
|
||||
commands::set_gate,
|
||||
commands::set_compressor,
|
||||
]
|
||||
)
|
||||
.run(tauri::generate_context!())
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"title": "thomann-dsp-app",
|
||||
"width": 1200,
|
||||
"height": 800,
|
||||
"minWidth": 900,
|
||||
"minWidth": 1000,
|
||||
"minHeight": 600
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user