mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-26 14:41:04 +03:00
fix audio no sound, add missing VideoFrame timestamp
move get_time to hbb_common Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
// https://github.com/krruzic/pulsectl
|
||||
|
||||
use super::*;
|
||||
use hbb_common::get_time;
|
||||
use magnum_opus::{Application::*, Channels::*, Encoder};
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
|
||||
@@ -348,7 +349,7 @@ fn send_f32(data: &[f32], encoder: &mut Encoder, sp: &GenericService) {
|
||||
let mut msg_out = Message::new();
|
||||
msg_out.set_audio_frame(AudioFrame {
|
||||
data: data.into(),
|
||||
timestamp: crate::common::get_time(),
|
||||
timestamp: get_time(),
|
||||
..Default::default()
|
||||
});
|
||||
sp.send(msg_out);
|
||||
@@ -368,7 +369,7 @@ fn send_f32(data: &[f32], encoder: &mut Encoder, sp: &GenericService) {
|
||||
let mut msg_out = Message::new();
|
||||
msg_out.set_audio_frame(AudioFrame {
|
||||
data: data.into(),
|
||||
timestamp: crate::common::get_time(),
|
||||
timestamp: get_time(),
|
||||
..Default::default()
|
||||
});
|
||||
sp.send(msg_out);
|
||||
|
||||
Reference in New Issue
Block a user