From e3ab57c0b6deddb206cb22f57500d41036e7387e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Thu, 13 Apr 2017 01:54:25 +0200 Subject: [PATCH] [Echo Cancel] Change the DEVICE_MASTER_DEVICE property when changing device --- src/modules/echo-cancel/module-echo-cancel.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c index 4f80be4..89c2ab0 100644 --- a/src/modules/echo-cancel/module-echo-cancel.c +++ b/src/modules/echo-cancel/module-echo-cancel.c @@ -1454,9 +1454,10 @@ static void source_output_moving_cb(pa_source_output *o, pa_source *dest) { pa_proplist *pl; pl = pa_proplist_new(); - if (u->sink_input->sink) + if (u->sink_input->sink) { + pa_proplist_sets(pl, PA_PROP_DEVICE_MASTER_DEVICE, u->sink_input->sink->name); y = pa_proplist_gets(u->sink_input->sink->proplist, PA_PROP_DEVICE_DESCRIPTION); - else + } else y = ""; /* Probably in the middle of a move */ z = pa_proplist_gets(dest->proplist, PA_PROP_DEVICE_DESCRIPTION); pa_proplist_setf(pl, PA_PROP_DEVICE_DESCRIPTION, "%s (echo cancelled with %s)", z ? z : dest->name, @@ -1485,9 +1486,10 @@ static void sink_input_moving_cb(pa_sink_input *i, pa_sink *dest) { pa_proplist *pl; pl = pa_proplist_new(); - if (u->source_output->source) + if (u->source_output->source) { + pa_proplist_sets(pl, PA_PROP_DEVICE_MASTER_DEVICE, u->source_output->source->name); y = pa_proplist_gets(u->source_output->source->proplist, PA_PROP_DEVICE_DESCRIPTION); - else + } else y = ""; /* Probably in the middle of a move */ z = pa_proplist_gets(dest->proplist, PA_PROP_DEVICE_DESCRIPTION); pa_proplist_setf(pl, PA_PROP_DEVICE_DESCRIPTION, "%s (echo cancelled with %s)", z ? z : dest->name, -- 2.7.4