Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

audio: Run webrtc receiver task on the realtime-priority thread as well (#51315)

Piotr Osiewicz56b2eae745d3
diff --git a/crates/livekit_client/src/livekit_client/playback.rs b/crates/livekit_client/src/livekit_client/playback.rs
index f62de78b4f9..88ebdfd3894 100644
--- a/crates/livekit_client/src/livekit_client/playback.rs
+++ b/crates/livekit_client/src/livekit_client/playback.rs
@@ -111,7 +111,7 @@ impl AudioStack {
source.num_channels as i32,
);
- let receive_task = self.executor.spawn({
+ let receive_task = self.executor.spawn_with_priority(Priority::RealtimeAudio, {
let source = source.clone();
async move {
while let Some(frame) = stream.next().await {
@@ -202,7 +202,7 @@ impl AudioStack {
let apm = self.apm.clone();
let (frame_tx, mut frame_rx) = futures::channel::mpsc::unbounded();
- let transmit_task = self.executor.spawn({
+ let transmit_task = self.executor.spawn_with_priority(Priority::RealtimeAudio, {
async move {
while let Some(frame) = frame_rx.next().await {
source.capture_frame(&frame).await.log_err();