feat: add limiter
This commit is contained in:
@@ -290,4 +290,21 @@ pub async fn set_compressor(
|
||||
)
|
||||
.map_err(|e| e.to_string())
|
||||
})
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub async fn set_limiter(
|
||||
state: State<'_, AppState>,
|
||||
id: u64,
|
||||
channel: types::OutputChannel,
|
||||
threshold: f32,
|
||||
attack: u16,
|
||||
release: u16,
|
||||
) -> Result<bool, String> {
|
||||
state.with_device_mut(id, |device| {
|
||||
device
|
||||
.dsp
|
||||
.set_limiter(channel, threshold, attack, release)
|
||||
.map_err(|e| e.to_string())
|
||||
})
|
||||
}
|
||||
@@ -22,6 +22,7 @@ pub fn run() {
|
||||
commands::set_current_preset_name,
|
||||
commands::set_gate,
|
||||
commands::set_compressor,
|
||||
commands::set_limiter,
|
||||
]
|
||||
)
|
||||
.run(tauri::generate_context!())
|
||||
|
||||
Reference in New Issue
Block a user