Cleanup
Signed-off-by: Aron Heinecke <aron.heinecke@t-online.de>
This commit is contained in:
parent
7c77c2cd52
commit
a9460dca13
1 changed files with 8 additions and 14 deletions
|
@ -406,11 +406,6 @@ impl VoiceEventHandler for Receiver {
|
|||
let opus_slice = &data[start..];
|
||||
let dur;
|
||||
{
|
||||
let mut lock_decoder = self.decoder.lock().await;
|
||||
let mut decoded: [i16; 48000 *2 ] = [0; 48000 * 2];
|
||||
if let Err(e) = lock_decoder.decode(Some(opus_slice), &mut decoded[..], false) {
|
||||
eprintln!("Failed to handle Discord voice packet: {:?}",e);
|
||||
} else {
|
||||
let time = std::time::Instant::now();
|
||||
let mut lock = self.sink.lock().await;
|
||||
dur = time.elapsed();
|
||||
|
@ -421,7 +416,6 @@ impl VoiceEventHandler for Receiver {
|
|||
eprintln!("Acquiring lock took {}ms",dur.as_millis());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
Ctx::RtcpPacket {packet, payload_offset, payload_end_pad} => {
|
||||
|
|
Loading…
Reference in a new issue