audio: Run webrtc receiver task on the realtime-priority thread as well (#51315)
Co-authored-by: Jakub Konka <jakub@zed.dev> Closes #ISSUE Before you mark this PR as ready for review, make sure that you have: - [ ] Added a solid test coverage and/or screenshots from doing manual testing - [ ] Done a self-review taking into account security and performance aspects - [ ] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - Fixed issues with tremendous audio latency in long-running collab calls. Co-authored-by: Jakub Konka <jakub@zed.dev>
This commit is contained in:
1 parent
abb29dbe62
commit
d104fd5fab
1 file changed
+2
-2
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user