Skip to content

Commit

Permalink
Sink.play is not the opposite of Sink.stop in Rodio
Browse files Browse the repository at this point in the history
  • Loading branch information
willstott101 committed Mar 1, 2019
1 parent e026d48 commit cd6f27c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions playback/src/audio_backend/rodio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,15 @@ impl Open for RodioSink {

impl Sink for RodioSink {
fn start(&mut self) -> io::Result<()> {
self.rodio_sink.play();
// More similar to an "unpause" than "play". Doesn't undo "stop".
// self.rodio_sink.play();
Ok(())
}

fn stop(&mut self) -> io::Result<()> {
self.rodio_sink.stop();
// This will immediately stop playback, but the sink is then unusable.
// We just have to let the current buffer play till the end.
// self.rodio_sink.stop();
Ok(())
}

Expand Down

0 comments on commit cd6f27c

Please sign in to comment.