#include #include "utils_tests.h" int main (int argc, char **argv) { uint_t size = 4096; uint_t samplerate = 44100; uint_t bins_per_octave = 24; uint_t run_times = 10; uint_t i = 0; if ( argc >= 2 ) size = atoi(argv[1]); if ( argc >= 3 ) samplerate = atoi(argv[2]); if ( argc >= 4 ) bins_per_octave = atoi(argv[3]); if ( argc >= 5 ) run_times = atoi(argv[4]); cvec_t *fftgrain = new_cvec (size); aubio_constantq_t * s = new_aubio_constantq (size, samplerate, bins_per_octave); fvec_t *cqt_output; if (!s) return 1; fftgrain->norm[1] = 1.0; fftgrain->norm[size/8] = 1.0; cqt_output = new_fvec (aubio_constantq_get_numbins(s)); while (i < run_times) { aubio_constantq_do (s, fftgrain, cqt_output); i++; } fvec_print (cqt_output); del_aubio_constantq (s); del_fvec (cqt_output); del_cvec (fftgrain); return 0; }