feat: add set gain
This commit is contained in:
+10
-3
@@ -1,14 +1,21 @@
|
||||
use std::sync::Mutex;
|
||||
use std::sync::{Mutex, Arc};
|
||||
use std::collections::HashMap;
|
||||
use dsp_thomann::dsp408::DSP408;
|
||||
|
||||
pub struct DSPDevice {
|
||||
pub dsp: DSP408,
|
||||
}
|
||||
|
||||
pub struct AppState {
|
||||
pub devices: Mutex<Vec<DSP408>>,
|
||||
pub devices: Mutex<HashMap<u64, Arc<Mutex<DSPDevice>>>>,
|
||||
pub next_id: Mutex<u64>,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
pub fn new() -> Self {
|
||||
Self {
|
||||
devices: Mutex::new(Vec::new()),
|
||||
devices: Mutex::new(HashMap::new()),
|
||||
next_id: Mutex::new(1),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user