Changeset 3554:129c6f16409b in roaraudio


Ignore:
Timestamp:
02/20/10 03:57:01 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

update API

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • include/libroardsp/channels.h

    r3548 r3554  
    140140int roardsp_chanmap_calc(struct roardsp_chanmap * map, int what, int err_on_none); 
    141141 
    142 int roardsp_chanmap_mappcm8 (char    * out, char    * in, size_t len, size_t chans, char * map); 
    143 int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, char * map); 
    144 int roardsp_chanmap_mappcm24(void    * out, void    * in, size_t len, size_t chans, char * map); 
    145 int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, char * map); 
    146 int roardsp_chanmap_mappcm  (void    * out, void    * in, size_t len, size_t chans, char * map, int bits); 
     142int roardsp_chanmap_mappcm8 (char    * out, char    * in, size_t len, size_t chans, struct roardsp_chanmap * map); 
     143int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, struct roardsp_chanmap * map); 
     144int roardsp_chanmap_mappcm24(void    * out, void    * in, size_t len, size_t chans, struct roardsp_chanmap * map); 
     145int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, struct roardsp_chanmap * map); 
     146int roardsp_chanmap_mappcm  (void    * out, void    * in, size_t len, size_t chans, struct roardsp_chanmap * map, int bits); 
    147147 
    148148#endif 
  • libroardsp/channels.c

    r3552 r3554  
    394394} 
    395395 
    396 int roardsp_chanmap_mappcm8 (char    * out, char    * in, size_t len, size_t chans, char * map) { 
     396int roardsp_chanmap_mappcm8 (char    * out, char    * in, size_t len, size_t chans, struct roardsp_chanmap * map) { 
    397397 char buf[ROAR_MAX_CHANNELS]; 
    398398 size_t frame; 
     
    413413 
    414414   for (c = 0; c < chans; c++) { 
    415     buf[(int)map[c]] = in[c]; 
     415    buf[(int)map->map[c]] = in[c]; 
    416416   } 
    417417 
     
    425425  for (frame = 0; frame < len/(chans*_8BIT); frame++) { 
    426426   for (c = 0; c < chans; c++) { 
    427     out[(int)map[c]] = in[c]; 
     427    out[(int)map->map[c]] = in[c]; 
    428428   } 
    429429   in  += chans; 
     
    435435} 
    436436 
    437 int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, char * map) { 
     437int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, struct roardsp_chanmap * map) { 
    438438 int16_t buf[ROAR_MAX_CHANNELS]; 
    439439 size_t frame; 
     
    454454 
    455455   for (c = 0; c < chans; c++) { 
    456     buf[(int)map[c]] = in[c]; 
     456    buf[(int)map->map[c]] = in[c]; 
    457457   } 
    458458 
     
    466466  for (frame = 0; frame < len/(chans*_16BIT); frame++) { 
    467467   for (c = 0; c < chans; c++) { 
    468     out[(int)map[c]] = in[c]; 
     468    out[(int)map->map[c]] = in[c]; 
    469469   } 
    470470   in  += chans; 
     
    476476} 
    477477 
    478 int roardsp_chanmap_mappcm24(void    * out, void    * in, size_t len, size_t chans, char * map) { 
     478int roardsp_chanmap_mappcm24(void    * out, void    * in, size_t len, size_t chans, struct roardsp_chanmap * map) { 
    479479 return -1; 
    480480} 
    481481 
    482 int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, char * map) { 
     482int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, struct roardsp_chanmap * map) { 
    483483 int32_t buf[ROAR_MAX_CHANNELS]; 
    484484 size_t frame; 
     
    499499 
    500500   for (c = 0; c < chans; c++) { 
    501     buf[(int)map[c]] = in[c]; 
     501    buf[(int)map->map[c]] = in[c]; 
    502502   } 
    503503 
     
    511511  for (frame = 0; frame < len/(chans*_32BIT); frame++) { 
    512512   for (c = 0; c < chans; c++) { 
    513     out[(int)map[c]] = in[c]; 
     513    out[(int)map->map[c]] = in[c]; 
    514514   } 
    515515   in  += chans; 
     
    521521} 
    522522 
    523 int roardsp_chanmap_mappcm  (void    * out, void    * in, size_t len, size_t chans, char * map, int bits) { 
     523int roardsp_chanmap_mappcm  (void    * out, void    * in, size_t len, size_t chans, struct roardsp_chanmap * map, int bits) { 
    524524 if ( len == 0 ) 
    525525  return 0; 
  • roard/streams.c

    r3549 r3554  
    11121112 
    11131113 // check channel map: 
    1114  if ( roardsp_chanmap_mappcm(indata, indata, inlen, stream_info->channels, ss->chanmap.map, stream_info->bits) == -1 ) { 
     1114 if ( roardsp_chanmap_mappcm(indata, indata, inlen, stream_info->channels, &(ss->chanmap), stream_info->bits) == -1 ) { 
    11151115  if ( bufbuf != NULL ) 
    11161116   roar_buffer_free(bufbuf); 
Note: See TracChangeset for help on using the changeset viewer.