[pulseaudio-discuss] [PATCH 1/2] SunOS: Catch up with newer API

David Henningsson david.henningsson at canonical.com
Mon Jan 11 06:07:16 PST 2016


Hi,

this patch seems to need further explanation.

I e, what "newer API", and why have we added a set_mute call in some 
places after get_mute and not others?

On 2015-12-21 04:10, Kamil Rytarowski wrote:
> Patch from pkgsrc by Jonathan Perkin (Joyent).
> ---
>   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 c79918a..2fa0bff 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);
>       }
>

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list