[pulseaudio-commits] r1813 - in /branches/lennart/src: modules/module-combine.c pulsecore/modargs.c pulsecore/modargs.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Wed Sep 12 13:12:14 PDT 2007
Author: lennart
Date: Wed Sep 12 22:12:13 2007
New Revision: 1813
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=1813&root=pulseaudio&view=rev
Log:
change pa_modargs_get_channel_map() to take an extra argument for specifying the name of the modargs attribute to parse
Modified:
branches/lennart/src/modules/module-combine.c
branches/lennart/src/pulsecore/modargs.c
branches/lennart/src/pulsecore/modargs.h
Modified: branches/lennart/src/modules/module-combine.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/modules/module-combine.c?rev=1813&root=pulseaudio&r1=1812&r2=1813&view=diff
==============================================================================
--- branches/lennart/src/modules/module-combine.c (original)
+++ branches/lennart/src/modules/module-combine.c Wed Sep 12 22:12:13 2007
@@ -233,7 +233,7 @@
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 @@
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;
}
Modified: branches/lennart/src/pulsecore/modargs.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/modargs.c?rev=1813&root=pulseaudio&r1=1812&r2=1813&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/modargs.c (original)
+++ branches/lennart/src/pulsecore/modargs.c Wed Sep 12 22:12:13 2007
@@ -275,7 +275,7 @@
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 @@
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 @@
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)
Modified: branches/lennart/src/pulsecore/modargs.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/branches/lennart/src/pulsecore/modargs.h?rev=1813&root=pulseaudio&r1=1812&r2=1813&view=diff
==============================================================================
--- branches/lennart/src/pulsecore/modargs.h (original)
+++ branches/lennart/src/pulsecore/modargs.h Wed Sep 12 22:12:13 2007
@@ -49,8 +49,8 @@
/* 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
More information about the pulseaudio-commits
mailing list