Make LiveKit source use audio priority (#44881)

Release Notes:

- N/A
This commit is contained in:
Yara 🏳️‍⚧️
2025-12-15 14:58:38 +01:00
committed by GitHub
parent 7889aaf3fb
commit a6b7af3cbd

View File

@@ -47,14 +47,17 @@ impl LiveKitStream {
);
let (queue_input, queue_output) = rodio::queue::queue(true);
// spawn rtc stream
let receiver_task = executor.spawn({
async move {
while let Some(frame) = stream.next().await {
let samples = frame_to_samplesbuffer(frame);
queue_input.append(samples);
let receiver_task = executor.spawn_with_priority(
gpui::Priority::Realtime(gpui::RealtimePriority::Audio),
{
async move {
while let Some(frame) = stream.next().await {
let samples = frame_to_samplesbuffer(frame);
queue_input.append(samples);
}
}
}
});
},
);
LiveKitStream {
_receiver_task: receiver_task,