aboutsummaryrefslogtreecommitdiffstats
path: root/mumd/src/audio.rs
diff options
context:
space:
mode:
Diffstat (limited to 'mumd/src/audio.rs')
-rw-r--r--mumd/src/audio.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/mumd/src/audio.rs b/mumd/src/audio.rs
index e13845e..aa06a9d 100644
--- a/mumd/src/audio.rs
+++ b/mumd/src/audio.rs
@@ -293,9 +293,13 @@ fn input_callback<T: Sample>(
.unwrap();
opus_buf.truncate(result);
let bytes = Bytes::copy_from_slice(&opus_buf);
- input_sender
- .try_send(VoicePacketPayload::Opus(bytes, false))
- .unwrap(); //TODO handle full buffer / disconnect
+ match input_sender
+ .try_send(VoicePacketPayload::Opus(bytes, false)) { //TODO handle full buffer / disconnect
+ Ok(_) => {},
+ Err(_e) => {
+ //warn!("Error sending audio packet: {:?}", e);
+ }
+ }
*buf = tail;
}
}