Changeset 3026:9fd0b4fd32b8 in roaraudio


Ignore:
Timestamp:
11/01/09 10:54:04 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

higher filter order work better

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarvumeter.c

    r3025 r3026  
    214214 
    215215 if ( lowpass_freq > 1 ) { 
    216   if ( roardsp_filter_new(&filter, &s, ROARDSP_FILTER_LOWP) == -1 ) { 
    217    fprintf(stderr, "Error: can not open lowpass\n"); 
    218    roar_vio_close(&re); 
    219    roardsp_fchain_uninit(&fchain); 
    220    return 1; 
    221   } 
    222  
    223   if ( roardsp_filter_ctl(filter, ROARDSP_FCTL_FREQ, &lowpass_freq) == -1 ) { 
    224    fprintf(stderr, "Error: can not set filter frequency\n"); 
    225    roar_vio_close(&re); 
    226    roardsp_fchain_uninit(&fchain); 
    227    return 1; 
    228   } 
    229  
    230   if ( roardsp_fchain_add(&fchain, filter) == -1 ) { 
    231    fprintf(stderr, "Error: can not set filter frequency\n"); 
    232    roar_vio_close(&re); 
    233    roardsp_fchain_uninit(&fchain); 
    234    return 1; 
     216  for (i = 0; i < 6; i++) { 
     217   if ( roardsp_filter_new(&filter, &s, ROARDSP_FILTER_LOWP) == -1 ) { 
     218    fprintf(stderr, "Error: can not open lowpass\n"); 
     219    roar_vio_close(&re); 
     220    roardsp_fchain_uninit(&fchain); 
     221    return 1; 
     222   } 
     223 
     224   if ( roardsp_filter_ctl(filter, ROARDSP_FCTL_FREQ, &lowpass_freq) == -1 ) { 
     225    fprintf(stderr, "Error: can not set filter frequency\n"); 
     226    roar_vio_close(&re); 
     227    roardsp_fchain_uninit(&fchain); 
     228    return 1; 
     229   } 
     230 
     231   if ( roardsp_fchain_add(&fchain, filter) == -1 ) { 
     232    fprintf(stderr, "Error: can not set filter frequency\n"); 
     233    roar_vio_close(&re); 
     234    roardsp_fchain_uninit(&fchain); 
     235    return 1; 
     236   } 
    235237  } 
    236238 } 
Note: See TracChangeset for help on using the changeset viewer.