Index: include/libroardsp/channels.h
===================================================================
--- include/libroardsp/channels.h	(revision 3548)
+++ include/libroardsp/channels.h	(revision 3554)
@@ -140,9 +140,9 @@
 int roardsp_chanmap_calc(struct roardsp_chanmap * map, int what, int err_on_none);
 
-int roardsp_chanmap_mappcm8 (char    * out, char    * in, size_t len, size_t chans, char * map);
-int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, char * map);
-int roardsp_chanmap_mappcm24(void    * out, void    * in, size_t len, size_t chans, char * map);
-int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, char * map);
-int roardsp_chanmap_mappcm  (void    * out, void    * in, size_t len, size_t chans, char * map, int bits);
+int roardsp_chanmap_mappcm8 (char    * out, char    * in, size_t len, size_t chans, struct roardsp_chanmap * map);
+int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, struct roardsp_chanmap * map);
+int roardsp_chanmap_mappcm24(void    * out, void    * in, size_t len, size_t chans, struct roardsp_chanmap * map);
+int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, struct roardsp_chanmap * map);
+int roardsp_chanmap_mappcm  (void    * out, void    * in, size_t len, size_t chans, struct roardsp_chanmap * map, int bits);
 
 #endif
Index: libroardsp/channels.c
===================================================================
--- libroardsp/channels.c	(revision 3552)
+++ libroardsp/channels.c	(revision 3554)
@@ -394,5 +394,5 @@
 }
 
-int roardsp_chanmap_mappcm8 (char    * out, char    * in, size_t len, size_t chans, char * map) {
+int roardsp_chanmap_mappcm8 (char    * out, char    * in, size_t len, size_t chans, struct roardsp_chanmap * map) {
  char buf[ROAR_MAX_CHANNELS];
  size_t frame;
@@ -413,5 +413,5 @@
 
    for (c = 0; c < chans; c++) {
-    buf[(int)map[c]] = in[c];
+    buf[(int)map->map[c]] = in[c];
    }
 
@@ -425,5 +425,5 @@
   for (frame = 0; frame < len/(chans*_8BIT); frame++) {
    for (c = 0; c < chans; c++) {
-    out[(int)map[c]] = in[c];
+    out[(int)map->map[c]] = in[c];
    }
    in  += chans;
@@ -435,5 +435,5 @@
 }
 
-int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, char * map) {
+int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, struct roardsp_chanmap * map) {
  int16_t buf[ROAR_MAX_CHANNELS];
  size_t frame;
@@ -454,5 +454,5 @@
 
    for (c = 0; c < chans; c++) {
-    buf[(int)map[c]] = in[c];
+    buf[(int)map->map[c]] = in[c];
    }
 
@@ -466,5 +466,5 @@
   for (frame = 0; frame < len/(chans*_16BIT); frame++) {
    for (c = 0; c < chans; c++) {
-    out[(int)map[c]] = in[c];
+    out[(int)map->map[c]] = in[c];
    }
    in  += chans;
@@ -476,9 +476,9 @@
 }
 
-int roardsp_chanmap_mappcm24(void    * out, void    * in, size_t len, size_t chans, char * map) {
+int roardsp_chanmap_mappcm24(void    * out, void    * in, size_t len, size_t chans, struct roardsp_chanmap * map) {
  return -1;
 }
 
-int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, char * map) {
+int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, struct roardsp_chanmap * map) {
  int32_t buf[ROAR_MAX_CHANNELS];
  size_t frame;
@@ -499,5 +499,5 @@
 
    for (c = 0; c < chans; c++) {
-    buf[(int)map[c]] = in[c];
+    buf[(int)map->map[c]] = in[c];
    }
 
@@ -511,5 +511,5 @@
   for (frame = 0; frame < len/(chans*_32BIT); frame++) {
    for (c = 0; c < chans; c++) {
-    out[(int)map[c]] = in[c];
+    out[(int)map->map[c]] = in[c];
    }
    in  += chans;
@@ -521,5 +521,5 @@
 }
 
-int roardsp_chanmap_mappcm  (void    * out, void    * in, size_t len, size_t chans, char * map, int bits) {
+int roardsp_chanmap_mappcm  (void    * out, void    * in, size_t len, size_t chans, struct roardsp_chanmap * map, int bits) {
  if ( len == 0 )
   return 0;
Index: roard/streams.c
===================================================================
--- roard/streams.c	(revision 3549)
+++ roard/streams.c	(revision 3554)
@@ -1112,5 +1112,5 @@
 
  // check channel map:
- if ( roardsp_chanmap_mappcm(indata, indata, inlen, stream_info->channels, ss->chanmap.map, stream_info->bits) == -1 ) {
+ if ( roardsp_chanmap_mappcm(indata, indata, inlen, stream_info->channels, &(ss->chanmap), stream_info->bits) == -1 ) {
   if ( bufbuf != NULL )
    roar_buffer_free(bufbuf);
