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:
@@ -714,6 +714,7 @@ impl AudioHandler {
|
||||
.check_audio(frame.timestamp)
|
||||
.not()
|
||||
{
|
||||
log::debug!("audio frame {} is ignored", frame.timestamp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -724,6 +725,7 @@ impl AudioHandler {
|
||||
}
|
||||
#[cfg(target_os = "linux")]
|
||||
if self.simple.is_none() {
|
||||
log::debug!("PulseAudio simple binding does not exists");
|
||||
return;
|
||||
}
|
||||
#[cfg(target_os = "android")]
|
||||
@@ -768,6 +770,7 @@ impl AudioHandler {
|
||||
unsafe { std::slice::from_raw_parts::<u8>(buffer.as_ptr() as _, n * 4) };
|
||||
self.simple.as_mut().map(|x| x.write(data_u8));
|
||||
}
|
||||
log::debug!("write Audio frame {} to system.", frame.timestamp);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1589,9 +1592,11 @@ pub fn start_audio_thread(
|
||||
if let Ok(data) = audio_receiver.recv() {
|
||||
match data {
|
||||
MediaData::AudioFrame(af) => {
|
||||
log::debug!("recved audio frame={}", af.timestamp);
|
||||
audio_handler.handle_frame(af);
|
||||
}
|
||||
MediaData::AudioFormat(f) => {
|
||||
log::debug!("recved audio format, sample rate={}", f.sample_rate);
|
||||
audio_handler.handle_format(f);
|
||||
}
|
||||
_ => {}
|
||||
|
||||
Reference in New Issue
Block a user