[pulseaudio-discuss] [PATCH] allow-passthrough: Change the name of null-sink

Manuel Amador (Rudd-O) rudd-o at rudd-o.com
Wed Apr 19 07:36:59 UTC 2017


On 04/19/2017 02:36 AM, Jungsup Lee wrote:
> Sink's "media.name" property is mostly NULL, therefore
> using sink's name instead of sink's "media.name" property.
> ---
>  src/modules/module-allow-passthrough.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/modules/module-allow-passthrough.c b/src/modules/module-allow-passthrough.c
> index 31ff270..856c6c6 100644
> --- a/src/modules/module-allow-passthrough.c
> +++ b/src/modules/module-allow-passthrough.c
> @@ -59,7 +59,6 @@ static pa_sink *ensure_null_sink_for_sink(struct userdata *u, pa_sink *s, pa_cor
>      pa_module *m;
>      pa_sink *sink;
>      uint32_t idx;
> -    const char *name;
>  
>      sink = pa_hashmap_get(u->null_sinks, s);
>      if (sink != NULL) {
> @@ -67,10 +66,8 @@ static pa_sink *ensure_null_sink_for_sink(struct userdata *u, pa_sink *s, pa_cor
>          return sink;
>      }
>  
> -    name = pa_proplist_gets(s->proplist, PA_PROP_MEDIA_NAME);
> -
>      t = pa_sprintf_malloc("sink_name=allow_passthrough_null_%s sink_properties='device.description=\"%s\"'",
> -                          name ? name : "", _("Dummy Output"));
> +                          s->name, _("Dummy Output"));
>      m = pa_module_load(c, "module-null-sink", t);
>      pa_xfree(t);
>  

Nono, please, do not remove this option.  Sometimes we have programs
(like mixing boards) that load null sinks and *need* to name them so the
end user knows to distinguish them from actual null sinks that get
loaded by default when there's no output.  Do not remove features just
because *you* do not see the use case.

-- 
    Rudd-O
    http://rudd-o.com/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20170419/e9e320db/attachment.sig>


More information about the pulseaudio-discuss mailing list