Skip to content

Commit ba31ca7

Browse files
committed
refactor: rework queue and playback state
1 parent fa49823 commit ba31ca7

9 files changed

Lines changed: 585 additions & 333 deletions

File tree

player/src/audio.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ pub struct AudioThreadHandle {
221221
}
222222

223223
impl AudioThreadHandle {
224-
pub fn send(&mut self, cmd: AudioCommand) -> Result<(), mpsc::error::SendError<AudioCommand>> {
224+
pub fn send(&self, cmd: AudioCommand) -> Result<(), mpsc::error::SendError<AudioCommand>> {
225225
self.tx.send(cmd)
226226
}
227227
}
@@ -302,9 +302,6 @@ impl AudioThread {
302302
self.p.pause();
303303
let _ = self.tx.send(AudioStatus::Finished);
304304
}
305-
AudioData::Resume => {
306-
self.p.resume();
307-
}
308305
},
309306
AudioCommand::StartLate(frame_id) => {
310307
self.wants_play = true;

0 commit comments

Comments
 (0)