fix(player): resume path compile fixes

This commit is contained in:
vicrodh committed 2026-01-13 00:32:32 -06:00
1 parent 1e6a8b1aee
commit 333ae44d5a
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -645,8 +645,8 @@ impl Player {
};
let resume_pos = thread_state.position.load(Ordering::SeqCst);
let skipped_source = if resume_pos > 0 {
source.skip_duration(Duration::from_secs(resume_pos))
let skipped_source: Box<dyn Source<Item = i16> + Send> = if resume_pos > 0 {
Box::new(source.skip_duration(Duration::from_secs(resume_pos)))
} else {
source
};
@@ -679,7 +679,7 @@ impl Player {
thread_state.position_at_start.store(0, Ordering::SeqCst);
// Drop the stream to release the device and stop background CPU use.
drop(stream_opt.take());
*pause_suspend_deadline = None;
pause_suspend_deadline = None;
log::info!("Audio thread: stopped");
}
AudioCommand::SetVolume(volume) => {
+1 -1
View File
@@ -128,7 +128,7 @@ impl Sink {
.skippable()
.stoppable()
// if you change the duration update the docs for try_seek!
.periodic_access(Duration::from_millis(20), move |src| {
.periodic_access(Duration::from_millis(50), move |src| {
if controls.stopped.load(Ordering::SeqCst) {
src.stop();
*controls.position.lock().unwrap() = Duration::ZERO;