pulsesink: start unmuted when requested
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 24 Apr 2012 13:34:57 +0000 (15:34 +0200)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Wed, 25 Apr 2012 08:29:45 +0000 (10:29 +0200)
When we explicitely set the mute property to FALSE, connect to pulseaudio with
the PA_STREAM_START_UNMUTED flag set, otherwise pulseaudio will use its
previously used value (which might start the stream muted).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=672401

ext/pulse/pulsesink.c

index 4452cf6..804d491 100644 (file)
@@ -904,8 +904,12 @@ gst_pulseringbuffer_acquire (GstAudioRingBuffer * buf,
   flags = PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_AUTO_TIMING_UPDATE |
       PA_STREAM_ADJUST_LATENCY | PA_STREAM_START_CORKED;
 
-  if (psink->mute_set && psink->mute)
-    flags |= PA_STREAM_START_MUTED;
+  if (psink->mute_set) {
+    if (psink->mute)
+      flags |= PA_STREAM_START_MUTED;
+    else
+      flags |= PA_STREAM_START_UNMUTED;
+  }
 
   /* we always start corked (see flags above) */
   pbuf->corked = TRUE;