8 #include <pulse/channelmap.h>
9 #include <pulse/gccmacro.h>
11 int main(int argc
, char *argv
[]) {
12 char cm
[PA_CHANNEL_MAP_SNPRINT_MAX
];
13 pa_channel_map map
, map2
;
15 pa_channel_map_init_auto(&map
, 6, PA_CHANNEL_MAP_AIFF
);
17 fprintf(stderr
, "map: <%s>\n", pa_channel_map_snprint(cm
, sizeof(cm
), &map
));
19 pa_channel_map_init_auto(&map
, 6, PA_CHANNEL_MAP_AUX
);
21 fprintf(stderr
, "map: <%s>\n", pa_channel_map_snprint(cm
, sizeof(cm
), &map
));
23 pa_channel_map_init_auto(&map
, 6, PA_CHANNEL_MAP_ALSA
);
25 fprintf(stderr
, "map: <%s>\n", pa_channel_map_snprint(cm
, sizeof(cm
), &map
));
27 pa_channel_map_init_extend(&map
, 14, PA_CHANNEL_MAP_ALSA
);
29 fprintf(stderr
, "map: <%s>\n", pa_channel_map_snprint(cm
, sizeof(cm
), &map
));
31 pa_channel_map_parse(&map2
, cm
);
33 assert(pa_channel_map_equal(&map
, &map2
));
35 pa_channel_map_parse(&map2
, "left,test");