From d30ffcd1c0fa673332152417887faf78abd6bbc2 Mon Sep 17 00:00:00 2001 From: Sean McNamara Date: Wed, 25 Dec 2019 17:51:22 -0500 Subject: [PATCH] Mostly fix play/pause/stop behavior. Pause is latent. --- playback/src/audio_backend/gstreamer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playback/src/audio_backend/gstreamer.rs b/playback/src/audio_backend/gstreamer.rs index 37f5fcf1..51edb15b 100644 --- a/playback/src/audio_backend/gstreamer.rs +++ b/playback/src/audio_backend/gstreamer.rs @@ -78,6 +78,8 @@ impl Open for GstreamerSink { } }); + pipeline.set_state(gst::State::Playing).expect("Unable to set the pipeline to the `Playing` state"); + GstreamerSink { tx: tx, pipeline: pipeline @@ -87,11 +89,9 @@ impl Open for GstreamerSink { impl Sink for GstreamerSink { fn start(&mut self) -> io::Result<()> { - self.pipeline.set_state(gst::State::Playing).expect("Unable to set the pipeline to the `Playing` state"); Ok(()) } fn stop(&mut self) -> io::Result<()> { - self.pipeline.set_state(gst::State::Ready).expect("Unable to set the pipeline to the `Ready` state"); Ok(()) } fn write(&mut self, data: &[i16]) -> io::Result<()> {