# HG changeset patch # User michael # Date 1174528204 0 # Node ID dfe4db89562c69ea1023991216295d626809d78e # Parent 8d480f1b41dfa3a17c3eaa2191afaf93d76f0a62 reasonable cutoff frequency default diff -r 8d480f1b41df -r dfe4db89562c libaf/af_lavcresample.c --- a/libaf/af_lavcresample.c Wed Mar 21 18:39:57 2007 +0000 +++ b/libaf/af_lavcresample.c Thu Mar 22 01:50:04 2007 +0000 @@ -64,8 +64,9 @@ af->data->rate = out_rate; return test_output_res; case AF_CONTROL_COMMAND_LINE:{ + s->cutoff= 0.0; sscanf((char*)arg,"%d:%d:%d:%d:%lf", &af->data->rate, &s->filter_length, &s->linear, &s->phase_shift, &s->cutoff); - if(s->cutoff <= 0.0) s->cutoff= max(1.0 - 1.0/s->filter_length, 0.80); + if(s->cutoff <= 0.0) s->cutoff= max(1.0 - 6.5/(s->filter_length+8), 0.80); return AF_OK; } case AF_CONTROL_RESAMPLE_RATE | AF_CONTROL_SET: @@ -173,7 +174,7 @@ af->mul.d=1; af->data=calloc(1,sizeof(af_data_t)); s->filter_length= 16; - s->cutoff= max(1.0 - 1.0/s->filter_length, 0.80); + s->cutoff= max(1.0 - 6.5/(s->filter_length+8), 0.80); s->phase_shift= 10; // s->setup = RSMP_INT | FREQ_SLOPPY; af->setup=s;