diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-03-24 18:14:45 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-03-24 18:14:45 +0100 |
| commit | 584b084424bb21c23c107116b239b7fe871a2cc1 (patch) | |
| tree | 714609f731d192054518e09fb0922d524c682cf2 /mumd/src | |
| parent | a5c26eaad44c45da852027d707bf1d8e838ed901 (diff) | |
| download | mum-584b084424bb21c23c107116b239b7fe871a2cc1.tar.gz | |
use same phase watcher in audio and state
Closes #72
Diffstat (limited to 'mumd/src')
| -rw-r--r-- | mumd/src/state.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mumd/src/state.rs b/mumd/src/state.rs index 6f22f54..ae7ae70 100644 --- a/mumd/src/state.rs +++ b/mumd/src/state.rs @@ -63,17 +63,17 @@ pub struct State { impl State { pub fn new() -> Self { let config = mumlib::config::read_default_cfg(); - let watcher = watch::channel(StatePhase::Disconnected); + let phase_watcher = watch::channel(StatePhase::Disconnected); let audio = Audio::new( config.audio.input_volume.unwrap_or(1.0), config.audio.output_volume.unwrap_or(1.0), - watcher.1.clone(), + phase_watcher.1.clone(), ); let mut state = Self { config, server: None, audio, - phase_watcher: watch::channel(StatePhase::Disconnected), + phase_watcher, }; state.reload_config(); state |
