Changeset 2991:2006474e65c9 in roaraudio
- Timestamp:
- 10/26/09 13:40:45 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roarclients/roarphone.c
r2986 r2991 59 59 int64_t dtx_threshold; 60 60 size_t jumbo_mtu; 61 struct { 62 struct { 63 int downmix; 64 float lowp_freq; 65 } in; 66 } filter; 61 67 } g_conf; 62 68 … … 104 110 " --bits BITS - Set bits per sample\n" 105 111 " --chans CHANNELS - Set number of channels\n" 112 ); 113 114 printf("\nAudio Filter Options:\n\n"); 115 printf(" --afi-downmix - Enable input downmixing\n" 116 " --afi-lowpass FREQ - Enable input lowpass at FREQ (in Hz)\n" 106 117 ); 107 118 … … 374 385 struct roar_vio_calls dvio, svio, svio_jumbo, svio_real; 375 386 struct roar_vio_calls * svio_p; 387 struct roardsp_filter * filter; 376 388 char * driver = DRIVER; 377 389 char * device = NULL; … … 406 418 } else if ( strcmp(k, "--channels") == 0 || strcmp(k, "--chans") == 0 ) { 407 419 info.channels = atoi(argv[++i]); 420 421 /* 422 printf(" --afi-downmix - Enable input downmixing\n" 423 " --afi-lowpass FREQ - Enable input lowpass at FREQ (in Hz)\n" 424 */ 425 } else if ( strcmp(k, "--afi-downmix") == 0 ) { 426 g_conf.filter.in.downmix = 1; 427 } else if ( strcmp(k, "--afi-lowpass") == 0 ) { 428 g_conf.filter.in.lowp_freq = atof(argv[++i]); 429 408 430 } else if ( strcmp(k, "--codec") == 0 ) { 409 431 info.codec = roar_str2codec(argv[++i]); 432 410 433 } else if ( strcmp(k, "--driver") == 0 ) { 411 434 driver = argv[++i]; … … 524 547 set_meta(); 525 548 549 #define _err(x) roar_vio_close(&dvio); roar_vio_close(&svio); return (x) 550 551 if ( g_conf.filter.in.downmix ) { 552 if ( roardsp_filter_new(&filter, &(g_cons.stream), ROARDSP_FILTER_DOWNMIX) == -1 ) { 553 _err(2); 554 } 555 556 if ( roardsp_fchain_add(&(g_filterchains.input), filter) == -1 ) { 557 _err(2); 558 } 559 } 560 561 if ( g_conf.filter.in.lowp_freq > 1 ) { 562 if ( roardsp_filter_new(&filter, &(g_cons.stream), ROARDSP_FILTER_LOWP) == -1 ) { 563 _err(2); 564 } 565 566 if ( roardsp_filter_ctl(filter, ROARDSP_FCTL_FREQ, &(g_conf.filter.in.lowp_freq)) == -1 ) { 567 _err(2); 568 } 569 570 if ( roardsp_fchain_add(&(g_filterchains.input), filter) == -1 ) { 571 _err(2); 572 } 573 } 574 575 #undef _err 576 526 577 if ( g_conf.transcode ) { 527 578 dinfo.codec = info.codec;
Note: See TracChangeset
for help on using the changeset viewer.