document encoder mutex
Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
This commit is contained in:
parent
db8a3ec796
commit
4a70d68aff
1 changed files with 1 additions and 0 deletions
|
@ -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;},
|
||||
|
|
Loading…
Reference in a new issue