shithub: aubio

Download patch

ref: 38837b14711df42329c1cad2a78ff51f8f4242da
parent: f14a78d83431facbbe9e350460e8116ef1c66f9e
author: Paul Brossier <[email protected]>
date: Sat Sep 8 15:05:15 EDT 2007

aubiomfcc.c: get hi/lowfreq after common_init, delete mfcc object before common_del

--- a/examples/aubiomfcc.c
+++ b/examples/aubiomfcc.c
@@ -82,9 +82,9 @@
 int main(int argc, char **argv) {
   // params
   uint_t n_filters = 11;
-  smpl_t lowfreq = 500.;
-  smpl_t highfreq = 2000.;
   examples_common_init(argc,argv);
+  smpl_t lowfreq = 0.;
+  smpl_t highfreq = samplerate;
   mfcc_out = new_fvec(n_filters,channels);
   
   //populating the filter
@@ -93,13 +93,14 @@
 
   //process
   examples_common_process(aubio_process,process_print);
-  examples_common_del();
-  debug("End of program.\n");
-  fflush(stderr);
   
   //destroying mfcc 
   del_aubio_mfcc(mfcc);
   del_fvec(mfcc_out);
+
+  examples_common_del();
+  debug("End of program.\n");
+  fflush(stderr);
   
   return 0;
 }