mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
try to fix audio play noise;improve audio performance
This commit is contained in:
14
src/ipc.rs
14
src/ipc.rs
@@ -400,6 +400,20 @@ where
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub async fn send_raw(&mut self, data: Vec<u8>) -> ResultType<()> {
|
||||
self.inner.send(bytes::Bytes::from(data)).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn next_raw(&mut self) -> ResultType<bytes::BytesMut> {
|
||||
match self.inner.next().await {
|
||||
Some(Ok(res)) => Ok(res),
|
||||
_ => {
|
||||
bail!("reset by the peer");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[tokio::main(flavor = "current_thread")]
|
||||
|
||||
Reference in New Issue
Block a user