From 4a70d68afff6b630b90993e1afe1e59a02ebf85c Mon Sep 17 00:00:00 2001 From: Aron Heinecke Date: Sat, 22 May 2021 23:54:01 +0200 Subject: [PATCH] document encoder mutex Signed-off-by: Aron Heinecke --- src/main.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.rs b/src/main.rs index 273b456..5eab504 100644 --- a/src/main.rs +++ b/src/main.rs @@ -271,6 +271,7 @@ async fn process_discord_audio(voice_buffer: &AudioBufferDiscord, encoder: &Arc< } // encode back to opus + // this should never block, thus we don't fail gracefully for it let lock = encoder_c.try_lock().expect("Can't reach encoder!"); let length = match lock.encode(&data, &mut encoded) { Err(e) => {eprintln!("Failed to encode voice: {}",e); return None;},