summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/modules/module-combine.c4
-rw-r--r--src/pulsecore/modargs.c6
-rw-r--r--src/pulsecore/modargs.h4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/module-combine.c b/src/modules/module-combine.c
index 390b6e5c..dcdc954e 100644
--- a/src/modules/module-combine.c
+++ b/src/modules/module-combine.c
@@ -233,7 +233,7 @@ static void thread_func(void *userdata) {
pa_rtclock_get(&u->timestamp);
- /* This is only run when were are in NULL mode, to make sure that
+ /* This is only run when we are in NULL mode, to make sure that
* playback doesn't stop. In all other cases we hook our stuff
* into the master sink. */
@@ -1029,7 +1029,7 @@ int pa__init(pa_module*m) {
else
pa_channel_map_init_auto(&map, ss.channels, PA_CHANNEL_MAP_DEFAULT);
- if ((pa_modargs_get_channel_map(ma, &map) < 0)) {
+ if ((pa_modargs_get_channel_map(ma, NULL, &map) < 0)) {
pa_log("Invalid channel map.");
goto fail;
}
diff --git a/src/pulsecore/modargs.c b/src/pulsecore/modargs.c
index 41e80084..7ce3dd08 100644
--- a/src/pulsecore/modargs.c
+++ b/src/pulsecore/modargs.c
@@ -275,7 +275,7 @@ int pa_modargs_get_sample_spec(pa_modargs *ma, pa_sample_spec *rss) {
return 0;
}
-int pa_modargs_get_channel_map(pa_modargs *ma, pa_channel_map *rmap) {
+int pa_modargs_get_channel_map(pa_modargs *ma, const char *name, pa_channel_map *rmap) {
pa_channel_map map;
const char *cm;
@@ -284,7 +284,7 @@ int pa_modargs_get_channel_map(pa_modargs *ma, pa_channel_map *rmap) {
map = *rmap;
- if ((cm = pa_modargs_get_value(ma, "channel_map", NULL)))
+ if ((cm = pa_modargs_get_value(ma, name ? name : "channel_map", NULL)))
if (!pa_channel_map_parse(&map, cm))
return -1;
@@ -311,7 +311,7 @@ int pa_modargs_get_sample_spec_and_channel_map(pa_modargs *ma, pa_sample_spec *r
if (!pa_channel_map_init_auto(&map, ss.channels, def))
map.channels = 0;
- if (pa_modargs_get_channel_map(ma, &map) < 0)
+ if (pa_modargs_get_channel_map(ma, NULL, &map) < 0)
return -1;
if (map.channels != ss.channels)
diff --git a/src/pulsecore/modargs.h b/src/pulsecore/modargs.h
index 77262e1e..aa175885 100644
--- a/src/pulsecore/modargs.h
+++ b/src/pulsecore/modargs.h
@@ -49,8 +49,8 @@ int pa_modargs_get_value_boolean(pa_modargs *ma, const char *key, int *value);
/* Return sample spec data from the three arguments "rate", "format" and "channels" */
int pa_modargs_get_sample_spec(pa_modargs *ma, pa_sample_spec *ss);
-/* Return channel map data from the argument "channel_map" */
-int pa_modargs_get_channel_map(pa_modargs *ma, pa_channel_map *map);
+/* Return channel map data from the argument "channel_map" if name is NULL, otherwise read from the specified argument */
+int pa_modargs_get_channel_map(pa_modargs *ma, const char *name, pa_channel_map *map);
/* Combination of pa_modargs_get_sample_spec() and
pa_modargs_get_channel_map(). Not always suitable, since this routine