diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-01-05 20:02:32 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-01-05 20:02:32 +0100 |
| commit | b15e010a6bebc7b7c6b8afb1b51f2673d0695e06 (patch) | |
| tree | dfb34f494d9bf49ad504cdd5b319fc73cd49800b /mumd/src/audio.rs | |
| parent | ab038b58b4440804cdfded56167ce72b599d87c8 (diff) | |
| download | mum-b15e010a6bebc7b7c6b8afb1b51f2673d0695e06.tar.gz | |
tokio mutex
Diffstat (limited to 'mumd/src/audio.rs')
| -rw-r--r-- | mumd/src/audio.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mumd/src/audio.rs b/mumd/src/audio.rs index 4f9b73c..3f03e61 100644 --- a/mumd/src/audio.rs +++ b/mumd/src/audio.rs @@ -76,7 +76,7 @@ pub struct Audio { _output_stream: cpal::Stream, _input_stream: cpal::Stream, - input_channel_receiver: Arc<Mutex<Box<dyn Stream<Item = VoicePacket<Serverbound>> + Unpin>>>, + input_channel_receiver: Arc<tokio::sync::Mutex<Box<dyn Stream<Item = VoicePacket<Serverbound>> + Unpin>>>, input_volume_sender: watch::Sender<f32>, output_volume_sender: watch::Sender<f32>, @@ -227,7 +227,7 @@ impl Audio { _output_stream: output_stream, _input_stream: input_stream, input_volume_sender, - input_channel_receiver: Arc::new(Mutex::new(Box::new(opus_stream))), + input_channel_receiver: Arc::new(tokio::sync::Mutex::new(Box::new(opus_stream))), client_streams, sounds: HashMap::new(), output_volume_sender, @@ -337,7 +337,7 @@ impl Audio { } } - pub fn input_receiver(&self) -> Arc<Mutex<Box<dyn Stream<Item = VoicePacket<Serverbound>> + Unpin>>> { + pub fn input_receiver(&self) -> Arc<tokio::sync::Mutex<Box<dyn Stream<Item = VoicePacket<Serverbound>> + Unpin>>> { Arc::clone(&self.input_channel_receiver) } |
