From 818549f38c941c1bb68b6023e4ab6b122739b25d Mon Sep 17 00:00:00 2001 From: Aron Heinecke Date: Wed, 12 May 2021 00:44:57 +0200 Subject: [PATCH] document origin of ts_voice files Signed-off-by: Aron Heinecke --- src/main.rs | 9 +++++---- src/ts_voice/mod.rs | 1 + src/ts_voice/ts_to_audio.rs | 4 +++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index 17c0f9a..75cda73 100644 --- a/src/main.rs +++ b/src/main.rs @@ -175,10 +175,11 @@ async fn main() -> Result<()> { AudioData::S2CWhisper { from, .. } => *from, _ => panic!("Can only handle S2C packets but got a C2S packet"), }); - let mut t2a = t2a.lock().unwrap(); - if let Err(e) = t2a.play_packet((con_id, from), packet) { - debug!(logger, "Failed to play packet"; "error" => %e); - } + + // let mut t2a = t2a.lock().unwrap(); + // if let Err(e) = t2a.play_packet((con_id, from), packet) { + // debug!(logger, "Failed to play packet"; "error" => %e); + // } } Ok(()) }); diff --git a/src/ts_voice/mod.rs b/src/ts_voice/mod.rs index df28ae2..5323446 100644 --- a/src/ts_voice/mod.rs +++ b/src/ts_voice/mod.rs @@ -7,6 +7,7 @@ use tokio::task::LocalSet; use ts_to_audio::TsToAudio; +// Example from tsclientlib, to be removed later on pub mod ts_to_audio; diff --git a/src/ts_voice/ts_to_audio.rs b/src/ts_voice/ts_to_audio.rs index 1acf351..df10ea0 100644 --- a/src/ts_voice/ts_to_audio.rs +++ b/src/ts_voice/ts_to_audio.rs @@ -11,6 +11,8 @@ use tokio_stream::wrappers::IntervalStream; use tsclientlib::ClientId; use tsproto_packets::packets::InAudioBuf; +// Example from tsclientlib, to be removed later on + use super::*; use crate::ConnectionId; @@ -95,7 +97,7 @@ impl TsToAudio { } future::ready(()) }), - ); + ); } pub(crate) fn play_packet(&mut self, id: Id, packet: InAudioBuf) -> Result<()> {