Skip to content

Commit

Permalink
An attempt to fix the sound issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeoneToIgnore committed Nov 19, 2024
1 parent 8b20ce6 commit 453112d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions crates/live_kit_client/src/live_kit_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,16 @@ pub fn capture_local_audio_track(
);
}
if let Some(stream) = &stream {
loop {
stream.play().log_err();
stream.play().log_err();
}

// We need to keep the thread alive and task not dropped, so the `stream` is not dropped.
// `stream` is `!Send` so we cannot move it away anywhere else.
loop {
std::thread::park();
// Suppress the unreachable code warning
if false {
break;
}
}

Expand Down

0 comments on commit 453112d

Please sign in to comment.