solaris: Catch up with newer API

Patch upstreamed from pkgsrc by Kamil Rytarowski <n54@gmx.com>.

See commit e4a7625ba8 for why this was
originally done.
This commit is contained in:
Jonathan Perkin 2015-12-21 04:10:34 +01:00 committed by Arun Raghavan
parent 81d3eb8467
commit 68216e8ff8

View file

@ -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); pa_smoother_resume(u->smoother, pa_rtclock_now(), true);
if (!u->source || u->source_suspended) { if (!u->source || u->source_suspended) {
bool mute;
if (unsuspend(u) < 0) if (unsuspend(u) < 0)
return -1; return -1;
u->sink->get_volume(u->sink); 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; u->sink_suspended = false;
} }
@ -1033,8 +1035,12 @@ int pa__init(pa_module *m) {
if (sink_new_data.muted_is_set) if (sink_new_data.muted_is_set)
u->sink->set_mute(u->sink); u->sink->set_mute(u->sink);
else else {
u->sink->get_mute(u->sink); bool mute;
if (u->sink->get_mute(u->sink, &mute) >= 0)
pa_sink_set_mute(u->sink, mute, false);
}
pa_sink_put(u->sink); pa_sink_put(u->sink);
} }