fix: 1-to-1 official equalizer, settings, animations, and click-outside dismissal
This commit is contained in:
parent
b7cfde1f6b
commit
b315b212a4
9 changed files with 928 additions and 557 deletions
|
|
@ -380,6 +380,7 @@ pub enum AppAction {
|
|||
SetCloseToTray(bool),
|
||||
UpdateEq {
|
||||
enabled: bool,
|
||||
preamp: f32,
|
||||
bands: [f32; 10],
|
||||
},
|
||||
SetMaxCoverCache(usize),
|
||||
|
|
@ -629,6 +630,7 @@ impl AppState {
|
|||
config.volume,
|
||||
config.muted,
|
||||
config.eq_enabled,
|
||||
config.eq_preamp,
|
||||
config.eq_bands_db,
|
||||
config.normalize_loudness,
|
||||
config.crossfade_enabled,
|
||||
|
|
@ -803,6 +805,7 @@ impl AppState {
|
|||
config.volume,
|
||||
config.muted,
|
||||
config.eq_enabled,
|
||||
config.eq_preamp,
|
||||
config.eq_bands_db,
|
||||
);
|
||||
audio.state.position_ms.store(position_ms, Ordering::SeqCst);
|
||||
|
|
@ -3127,10 +3130,16 @@ impl AppState {
|
|||
self.config.close_to_tray = v;
|
||||
self.save_config();
|
||||
}
|
||||
AppAction::UpdateEq { enabled, bands } => {
|
||||
AppAction::UpdateEq {
|
||||
enabled,
|
||||
preamp,
|
||||
bands,
|
||||
} => {
|
||||
let preamp = preamp.clamp(0.5, 1.5);
|
||||
self.config.eq_enabled = enabled;
|
||||
self.config.eq_preamp = preamp;
|
||||
self.config.eq_bands_db = bands;
|
||||
self.audio.set_eq(enabled, bands);
|
||||
self.audio.set_eq(enabled, preamp, bands);
|
||||
self.save_config();
|
||||
}
|
||||
AppAction::SetMaxCoverCache(cap) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue