feat: use new meter format

This commit is contained in:
2026-09-13 09:04:04 +02:00
parent 1e00ca3a7c
commit 9f2ace9698
11 changed files with 131 additions and 124 deletions
+5 -3
View File
@@ -44,7 +44,8 @@ impl AppState {
#[derive(serde::Serialize)]
pub struct DSP408Snapshot {
pub state: types::DSPState,
pub meters: types::Meters,
pub input_meters: types::InputMeters,
pub output_meters: types::OutputMeters,
pub mode: types::DSPMode,
}
@@ -101,7 +102,8 @@ pub async fn get_dsp_snapshot(
state.with_device_mut(id, |device| {
Ok(DSP408Snapshot {
state: device.dsp.state().clone(),
meters: device.dsp.meters().clone(),
input_meters: device.dsp.input_meters().clone(),
output_meters: device.dsp.output_meters().clone(),
mode: device.dsp.mode(),
})
})
@@ -202,7 +204,7 @@ pub async fn recall_preset(
pub async fn get_meter_levels(
state: State<'_, AppState>,
id: u64,
) -> Result<dsp_thomann::dsp408::types::Meters, String> {
) -> Result<(types::InputMeters, types::OutputMeters), String> {
state.with_device_mut(id, |device| {
device.dsp.get_meter_levels().map_err(|e| e.to_string())
})