mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
opt: remove latency detector on single audio
This commit is contained in:
@@ -171,6 +171,8 @@ impl Connection {
|
||||
let tx_cloned = tx.clone();
|
||||
// Start a audio thread to play the audio sent by peer.
|
||||
let latency_controller = LatencyController::new();
|
||||
// No video frame will be sent here, so we need to disable latency controller, or audio check may fail.
|
||||
latency_controller.lock().unwrap().set_enabled(false);
|
||||
let audio_sender = start_audio_thread(Some(latency_controller));
|
||||
let mut conn = Self {
|
||||
inner: ConnInner {
|
||||
@@ -1561,7 +1563,7 @@ impl Connection {
|
||||
_ => {}
|
||||
},
|
||||
Some(message::Union::AudioFrame(frame)) => {
|
||||
if !self.disable_audio {
|
||||
if !self.disable_audio {
|
||||
allow_err!(self.audio_sender.send(MediaData::AudioFrame(frame)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user