From 68216e8ff804dcbf1f5aad07eeae86403324435c Mon Sep 17 00:00:00 2001 From: Jonathan Perkin Date: Mon, 21 Dec 2015 04:10:34 +0100 Subject: solaris: Catch up with newer API Patch upstreamed from pkgsrc by Kamil Rytarowski . See commit e4a7625ba884c5cce20468d75937857343751c35 for why this was originally done. --- src/modules/module-solaris.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c index c79918abf..2fa0bffa6 100644 --- a/src/modules/module-solaris.c +++ b/src/modules/module-solaris.c @@ -412,10 +412,12 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse pa_smoother_resume(u->smoother, pa_rtclock_now(), true); if (!u->source || u->source_suspended) { + bool mute; if (unsuspend(u) < 0) return -1; u->sink->get_volume(u->sink); - u->sink->get_mute(u->sink); + if (u->sink->get_mute(u->sink, &mute) >= 0) + pa_sink_set_mute(u->sink, mute, false); } u->sink_suspended = false; } @@ -1033,8 +1035,12 @@ int pa__init(pa_module *m) { if (sink_new_data.muted_is_set) u->sink->set_mute(u->sink); - else - u->sink->get_mute(u->sink); + else { + bool mute; + + if (u->sink->get_mute(u->sink, &mute) >= 0) + pa_sink_set_mute(u->sink, mute, false); + } pa_sink_put(u->sink); } -- cgit v1.2.3