From: Mike Brady Date: Fri, 21 Sep 2018 16:36:49 +0000 (+0100) Subject: Unreference the pa stream when finished with it, so that it the sink can go idle. X-Git-Tag: 3.2.2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52af6c6c9a8ed6aa0b96ebaa698bb3b8e1e42ab5;p=thirdparty%2Fshairport-sync.git Unreference the pa stream when finished with it, so that it the sink can go idle. --- diff --git a/audio_pa.c b/audio_pa.c index ac1570e0..0d3aa28b 100644 --- a/audio_pa.c +++ b/audio_pa.c @@ -147,6 +147,7 @@ static void deinit(void) { static void start(__attribute__((unused)) int sample_rate, __attribute__((unused)) int sample_format) { + debug(1,"pa start"); uint32_t buffer_size_in_bytes = (uint32_t)2 * 2 * RATE * 0.1; // hard wired in here // debug(1, "pa_buffer size is %u bytes.", buffer_size_in_bytes); @@ -275,7 +276,8 @@ static void stop(void) { audio_umb = audio_lmb + audio_size; audio_occupancy = 0; - // debug(1, "finish with stream"); + debug(1,"pa stop"); + pa_stream_unref(stream); pa_stream_disconnect(stream); }