summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>2015-01-20 15:35:56 +0100
committerWim Taymans <wtaymans@redhat.com>2015-01-20 15:35:56 +0100
commitd9f4946f8f257b04e3c8579d86f8a0832a64fbdc (patch)
tree89e3d9d35deae50032bc0266a736c34edcc1a583
parenta25631e0c31349d8c41c343dad6161f21de66d1f (diff)
combine-sink: Add a convenience variable
-rw-r--r--src/modules/module-combine.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index cf9c37245..bac333ad8 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -902,6 +902,7 @@ static void update_description(struct userdata *u) {
}
static int output_create_sink_input(struct output *o) {
+ struct userdata *u;
pa_sink_input_new_data data;
pa_assert(o);
@@ -909,18 +910,20 @@ static int output_create_sink_input(struct output *o) {
if (o->sink_input)
return 0;
+ u = o->userdata;
+
pa_sink_input_new_data_init(&data);
data.sink = o->sink;
data.driver = __FILE__;
pa_proplist_setf(data.proplist, PA_PROP_MEDIA_NAME, "Simultaneous output on %s", pa_strnull(pa_proplist_gets(o->sink->proplist, PA_PROP_DEVICE_DESCRIPTION)));
pa_proplist_sets(data.proplist, PA_PROP_MEDIA_ROLE, "filter");
- pa_sink_input_new_data_set_sample_spec(&data, &o->userdata->sink->sample_spec);
- pa_sink_input_new_data_set_channel_map(&data, &o->userdata->sink->channel_map);
- data.module = o->userdata->module;
- data.resample_method = o->userdata->resample_method;
+ pa_sink_input_new_data_set_sample_spec(&data, &u->sink->sample_spec);
+ pa_sink_input_new_data_set_channel_map(&data, &u->sink->channel_map);
+ data.module = u->module;
+ data.resample_method = u->resample_method;
data.flags = PA_SINK_INPUT_VARIABLE_RATE|PA_SINK_INPUT_DONT_MOVE|PA_SINK_INPUT_NO_CREATE_ON_SUSPEND;
- pa_sink_input_new(&o->sink_input, o->userdata->core, &data);
+ pa_sink_input_new(&o->sink_input, u->core, &data);
pa_sink_input_new_data_done(&data);