Skip to content

Commit

Permalink
Optimistic update to controls.position in try_seek
Browse files Browse the repository at this point in the history
  • Loading branch information
lautarodragan committed Sep 5, 2024
1 parent 4805661 commit 2c95f1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,10 @@ impl Sink {
}

match feedback.recv() {
Ok(seek_res) => seek_res,
Ok(seek_res) => {
*self.controls.position.lock().unwrap() = pos;
seek_res
},
// The feedback channel closed. Probably another seekorder was set
// invalidating this one and closing the feedback channel
// ... or the audio thread panicked.
Expand Down

0 comments on commit 2c95f1a

Please sign in to comment.