summaryrefslogtreecommitdiffstats
path: root/src/modules/module-ladspa-sink.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-05-28 02:39:22 +0200
committerLennart Poettering <lennart@poettering.net>2009-05-28 02:39:22 +0200
commit1c4393acf0a641a4f462cfa6c368d23d9e55a1b8 (patch)
treed6c28d7e2c0ada5c091c404f0d6144aebafe4c04 /src/modules/module-ladspa-sink.c
parent208862698e8ebf6bebfd9a07e4cc4b43b3cd0d96 (diff)
modules: add {sink|source|card}_properties argument to all modules
Diffstat (limited to 'src/modules/module-ladspa-sink.c')
-rw-r--r--src/modules/module-ladspa-sink.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/module-ladspa-sink.c b/src/modules/module-ladspa-sink.c
index 44052c9c..15af74a6 100644
--- a/src/modules/module-ladspa-sink.c
+++ b/src/modules/module-ladspa-sink.c
@@ -50,10 +50,11 @@ PA_MODULE_VERSION(PACKAGE_VERSION);
PA_MODULE_LOAD_ONCE(FALSE);
PA_MODULE_USAGE(
"sink_name=<name for the sink> "
+ "sink_properties=<properties for the sink> "
"master=<name of sink to remap> "
"format=<sample format> "
- "channels=<number of channels> "
"rate=<sample rate> "
+ "channels=<number of channels> "
"channel_map=<channel map> "
"plugin=<ladspa plugin name> "
"label=<ladspa plugin label> "
@@ -85,10 +86,11 @@ struct userdata {
static const char* const valid_modargs[] = {
"sink_name",
+ "sink_properties",
"master",
"format",
- "channels",
"rate",
+ "channels",
"channel_map",
"plugin",
"label",
@@ -705,6 +707,12 @@ int pa__init(pa_module*m) {
pa_proplist_sets(sink_data.proplist, "device.ladspa.copyright", d->Copyright);
pa_proplist_setf(sink_data.proplist, "device.ladspa.unique_id", "%lu", (unsigned long) d->UniqueID);
+ if (pa_modargs_get_proplist(ma, "sink_properties", sink_data.proplist, PA_UPDATE_REPLACE) < 0) {
+ pa_log("Invalid properties");
+ pa_sink_new_data_done(&sink_data);
+ goto fail;
+ }
+
u->sink = pa_sink_new(m->core, &sink_data, PA_SINK_LATENCY|PA_SINK_DYNAMIC_LATENCY);
pa_sink_new_data_done(&sink_data);