From aeb38cf00f7cf47a032c2fd9dcffe179106eae57 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 16 Sep 2007 18:28:55 +0200 Subject: [PATCH] aubiomfcc.c: remove call do dump_filterbank, move printf outside process loop --- examples/aubiomfcc.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/examples/aubiomfcc.c b/examples/aubiomfcc.c index bba21993..135b0fcc 100644 --- a/examples/aubiomfcc.c +++ b/examples/aubiomfcc.c @@ -53,12 +53,6 @@ int aubio_process(float **input, float **output, int nframes) { //compute mfccs aubio_mfcc_do(mfcc, fftgrain, mfcc_out); - uint_t coef_cnt; - for (coef_cnt = 0; coef_cnt < n_coefs; coef_cnt++) { - outmsg("%f ",mfcc_out->data[0][coef_cnt]); - } - outmsg("\n"); - /* end of block loop */ pos = -1; /* so it will be zero next j loop */ } @@ -75,15 +69,16 @@ void process_print (void) { uint_t coef_cnt; if (output_filename == NULL) { -// if(frames >= 4) { -// outmsg("%f\t",(frames-4)*overlap_size/(float)samplerate); -// } -// else if (frames < 4) { -// outmsg("%f\t",0.); -// } - //outmsg("%f ",mfcc_out->data[0][0]); - - + if(frames >= 4) { + outmsg("%f\t",(frames-4)*overlap_size/(float)samplerate); + } + else if (frames < 4) { + outmsg("%f\t",0.); + } + for (coef_cnt = 0; coef_cnt < n_coefs; coef_cnt++) { + outmsg("%f ",mfcc_out->data[0][coef_cnt]); + } + outmsg("\n"); } } @@ -98,8 +93,6 @@ int main(int argc, char **argv) { //populating the filter mfcc = new_aubio_mfcc(buffer_size, samplerate, n_filters, n_coefs , lowfreq, highfreq, channels); - dump_filterbank(mfcc); - //process examples_common_process(aubio_process,process_print); -- 2.26.2