Changeset 3554:129c6f16409b in roaraudio
- Timestamp:
- 02/20/10 03:57:01 (14 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroardsp/channels.h
r3548 r3554 140 140 int roardsp_chanmap_calc(struct roardsp_chanmap * map, int what, int err_on_none); 141 141 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);142 int roardsp_chanmap_mappcm8 (char * out, char * in, size_t len, size_t chans, struct roardsp_chanmap * map); 143 int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, struct roardsp_chanmap * map); 144 int roardsp_chanmap_mappcm24(void * out, void * in, size_t len, size_t chans, struct roardsp_chanmap * map); 145 int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, struct roardsp_chanmap * map); 146 int roardsp_chanmap_mappcm (void * out, void * in, size_t len, size_t chans, struct roardsp_chanmap * map, int bits); 147 147 148 148 #endif -
libroardsp/channels.c
r3552 r3554 394 394 } 395 395 396 int roardsp_chanmap_mappcm8 (char * out, char * in, size_t len, size_t chans, char* map) {396 int roardsp_chanmap_mappcm8 (char * out, char * in, size_t len, size_t chans, struct roardsp_chanmap * map) { 397 397 char buf[ROAR_MAX_CHANNELS]; 398 398 size_t frame; … … 413 413 414 414 for (c = 0; c < chans; c++) { 415 buf[(int)map [c]] = in[c];415 buf[(int)map->map[c]] = in[c]; 416 416 } 417 417 … … 425 425 for (frame = 0; frame < len/(chans*_8BIT); frame++) { 426 426 for (c = 0; c < chans; c++) { 427 out[(int)map [c]] = in[c];427 out[(int)map->map[c]] = in[c]; 428 428 } 429 429 in += chans; … … 435 435 } 436 436 437 int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, char* map) {437 int roardsp_chanmap_mappcm16(int16_t * out, int16_t * in, size_t len, size_t chans, struct roardsp_chanmap * map) { 438 438 int16_t buf[ROAR_MAX_CHANNELS]; 439 439 size_t frame; … … 454 454 455 455 for (c = 0; c < chans; c++) { 456 buf[(int)map [c]] = in[c];456 buf[(int)map->map[c]] = in[c]; 457 457 } 458 458 … … 466 466 for (frame = 0; frame < len/(chans*_16BIT); frame++) { 467 467 for (c = 0; c < chans; c++) { 468 out[(int)map [c]] = in[c];468 out[(int)map->map[c]] = in[c]; 469 469 } 470 470 in += chans; … … 476 476 } 477 477 478 int roardsp_chanmap_mappcm24(void * out, void * in, size_t len, size_t chans, char* map) {478 int roardsp_chanmap_mappcm24(void * out, void * in, size_t len, size_t chans, struct roardsp_chanmap * map) { 479 479 return -1; 480 480 } 481 481 482 int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, char* map) {482 int roardsp_chanmap_mappcm32(int32_t * out, int32_t * in, size_t len, size_t chans, struct roardsp_chanmap * map) { 483 483 int32_t buf[ROAR_MAX_CHANNELS]; 484 484 size_t frame; … … 499 499 500 500 for (c = 0; c < chans; c++) { 501 buf[(int)map [c]] = in[c];501 buf[(int)map->map[c]] = in[c]; 502 502 } 503 503 … … 511 511 for (frame = 0; frame < len/(chans*_32BIT); frame++) { 512 512 for (c = 0; c < chans; c++) { 513 out[(int)map [c]] = in[c];513 out[(int)map->map[c]] = in[c]; 514 514 } 515 515 in += chans; … … 521 521 } 522 522 523 int roardsp_chanmap_mappcm (void * out, void * in, size_t len, size_t chans, char* map, int bits) {523 int roardsp_chanmap_mappcm (void * out, void * in, size_t len, size_t chans, struct roardsp_chanmap * map, int bits) { 524 524 if ( len == 0 ) 525 525 return 0; -
roard/streams.c
r3549 r3554 1112 1112 1113 1113 // 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 ) { 1115 1115 if ( bufbuf != NULL ) 1116 1116 roar_buffer_free(bufbuf);
Note: See TracChangeset
for help on using the changeset viewer.