From: Paul Brossier Date: Fri, 4 Dec 2009 00:47:17 +0000 (+0100) Subject: tests/src: switch to mono X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=aea235c732e935b5f9448ae3b51badef8b94ee3e;p=aubio.git tests/src: switch to mono --- diff --git a/tests/src/temporal/test-aweighting.c b/tests/src/temporal/test-aweighting.c index 62075b76..64915b25 100644 --- a/tests/src/temporal/test-aweighting.c +++ b/tests/src/temporal/test-aweighting.c @@ -7,28 +7,27 @@ int main(){ uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000}; uint_t nrates = 6; uint_t samplerate, i = 0; - uint_t channels = 2; for ( samplerate = rates[i]; i < nrates ; i++ ) { - f = new_aubio_filter_a_weighting (channels, samplerate); + f = new_aubio_filter_a_weighting (samplerate); del_aubio_filter (f); - f = new_aubio_filter (7, channels*2); + f = new_aubio_filter (7); aubio_filter_set_a_weighting (f, samplerate); del_aubio_filter (f); } // samplerate unknown - f = new_aubio_filter_a_weighting (channels, 4200); + f = new_aubio_filter_a_weighting (4200); del_aubio_filter (f); // order to small - f = new_aubio_filter (2, channels*2); + f = new_aubio_filter (2); aubio_filter_set_a_weighting (f, samplerate); del_aubio_filter (f); // order to big - f = new_aubio_filter (12, channels*2); + f = new_aubio_filter (12); aubio_filter_set_a_weighting (f, samplerate); del_aubio_filter (f); diff --git a/tests/src/temporal/test-cweighting.c b/tests/src/temporal/test-cweighting.c index 91770fec..d5283fc3 100644 --- a/tests/src/temporal/test-cweighting.c +++ b/tests/src/temporal/test-cweighting.c @@ -7,28 +7,27 @@ int main(){ uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000}; uint_t nrates = 6; uint_t samplerate, i = 0; - uint_t channels = 2; for ( samplerate = rates[i]; i < nrates ; i++ ) { - f = new_aubio_filter_c_weighting (channels, samplerate); + f = new_aubio_filter_c_weighting (samplerate); del_aubio_filter (f); - f = new_aubio_filter (5, channels*2); + f = new_aubio_filter (5); aubio_filter_set_c_weighting (f, samplerate); del_aubio_filter (f); } // samplerate unknown - f = new_aubio_filter_c_weighting (channels, 4200); + f = new_aubio_filter_c_weighting (4200); del_aubio_filter (f); // order to small - f = new_aubio_filter (2, channels*2); + f = new_aubio_filter (2); aubio_filter_set_c_weighting (f, samplerate); del_aubio_filter (f); // order to big - f = new_aubio_filter (12, channels*2); + f = new_aubio_filter (12); aubio_filter_set_c_weighting (f, samplerate); del_aubio_filter (f); diff --git a/tests/src/test-beattracking.c b/tests/src/test-beattracking.c index 63794fef..e4ac6dc7 100644 --- a/tests/src/test-beattracking.c +++ b/tests/src/test-beattracking.c @@ -6,12 +6,11 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t * in = new_fvec (win_s, channels); /* input buffer */ - fvec_t * out = new_fvec (win_s/4, channels); /* input buffer */ + fvec_t * in = new_fvec (win_s); /* input buffer */ + fvec_t * out = new_fvec (win_s/4); /* input buffer */ /* allocate fft and other memory space */ - aubio_beattracking_t * tempo = new_aubio_beattracking(win_s, channels); + aubio_beattracking_t * tempo = new_aubio_beattracking(win_s); uint_t i = 0; diff --git a/tests/src/test-biquad.c b/tests/src/test-biquad.c index 78d73188..6555cae3 100644 --- a/tests/src/test-biquad.c +++ b/tests/src/test-biquad.c @@ -3,9 +3,8 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t * in = new_fvec (win_s, channels); /* input buffer */ - aubio_filter_t * o = new_aubio_filter_biquad(0.3,0.2,0.1,0.2,0.3, channels); + fvec_t * in = new_fvec (win_s); /* input buffer */ + aubio_filter_t * o = new_aubio_filter_biquad(0.3,0.2,0.1,0.2,0.3); aubio_filter_do_filtfilt(o,in,in); aubio_filter_do(o,in); diff --git a/tests/src/test-cvec.c b/tests/src/test-cvec.c index e76471d1..f2e5cf05 100644 --- a/tests/src/test-cvec.c +++ b/tests/src/test-cvec.c @@ -3,8 +3,7 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - cvec_t * sp = new_cvec (win_s, channels); /* input buffer */ + cvec_t * sp = new_cvec (win_s); /* input buffer */ del_cvec(sp); return 0; diff --git a/tests/src/test-fft.c b/tests/src/test-fft.c index e43efa20..a17b9778 100644 --- a/tests/src/test-fft.c +++ b/tests/src/test-fft.c @@ -4,20 +4,19 @@ int main(){ /* allocate some memory */ uint_t win_s = 8; /* window size */ - uint_t channels = 1; /* number of channels */ - fvec_t * in = new_fvec (win_s, channels); /* input buffer */ - cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */ - fvec_t * out = new_fvec (win_s, channels); /* output buffer */ - in->data[0][0] = 1; - in->data[0][1] = 2; - in->data[0][2] = 3; - in->data[0][3] = 4; - in->data[0][4] = 5; - in->data[0][5] = 6; - in->data[0][6] = 5; - in->data[0][7] = 6; + fvec_t * in = new_fvec (win_s); /* input buffer */ + cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */ + fvec_t * out = new_fvec (win_s); /* output buffer */ + in->data[0] = 1; + in->data[1] = 2; + in->data[2] = 3; + in->data[3] = 4; + in->data[4] = 5; + in->data[5] = 6; + in->data[6] = 5; + in->data[7] = 6; /* allocate fft and other memory space */ - aubio_fft_t * fft = new_aubio_fft(win_s,channels); + aubio_fft_t * fft = new_aubio_fft(win_s); /* fill input with some data */ fvec_print(in); /* execute stft */ diff --git a/tests/src/test-filter.c b/tests/src/test-filter.c index 3ab11b73..84409d05 100644 --- a/tests/src/test-filter.c +++ b/tests/src/test-filter.c @@ -5,27 +5,26 @@ main (void) { /* allocate some memory */ uint_t win_s = 32; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t *in = new_fvec (win_s, channels); /* input buffer */ - fvec_t *out = new_fvec (win_s, channels); /* input buffer */ + fvec_t *in = new_fvec (win_s); /* input buffer */ + fvec_t *out = new_fvec (win_s); /* input buffer */ - aubio_filter_t *o = new_aubio_filter_c_weighting (channels, 44100); - in->data[0][12] = 0.5; + aubio_filter_t *o = new_aubio_filter_c_weighting (44100); + in->data[12] = 0.5; fvec_print (in); aubio_filter_do (o, in); fvec_print (in); del_aubio_filter (o); - o = new_aubio_filter_c_weighting (channels, 44100); - in->data[0][12] = 0.5; + o = new_aubio_filter_c_weighting (44100); + in->data[12] = 0.5; fvec_print (in); aubio_filter_do_outplace (o, in, out); fvec_print (out); del_aubio_filter (o); - o = new_aubio_filter_c_weighting (channels, 44100); - in->data[0][12] = 0.5; + o = new_aubio_filter_c_weighting (44100); + in->data[12] = 0.5; fvec_print (in); aubio_filter_do_filtfilt (o, in, out); fvec_print (out); diff --git a/tests/src/test-filterbank.c b/tests/src/test-filterbank.c index 5a1d0965..4ab3fcf7 100644 --- a/tests/src/test-filterbank.c +++ b/tests/src/test-filterbank.c @@ -8,11 +8,10 @@ main (void) { /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 2; /* number of channel */ uint_t n_filters = 13; /* number of filters */ - cvec_t *in = new_cvec (win_s, channels); /* input buffer */ - fvec_t *out = new_fvec (win_s, channels); /* input buffer */ - fvec_t *coeffs = NULL; + cvec_t *in = new_cvec (win_s); /* input buffer */ + fvec_t *out = new_fvec (win_s); /* input buffer */ + fmat_t *coeffs = NULL; /* allocate fft and other memory space */ aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s); @@ -22,6 +21,7 @@ main (void) return -1; } + /* if (fvec_max (coeffs) != 0.) { return -1; } @@ -29,8 +29,9 @@ main (void) if (fvec_min (coeffs) != 0.) { return -1; } + */ - fvec_print (coeffs); + fmat_print (coeffs); aubio_filterbank_do (o, in, out); diff --git a/tests/src/test-filterbank_mel.c b/tests/src/test-filterbank_mel.c index 3e417f9e..79001dfd 100644 --- a/tests/src/test-filterbank_mel.c +++ b/tests/src/test-filterbank_mel.c @@ -8,11 +8,10 @@ main (void) { /* allocate some memory */ uint_t win_s = 512; /* fft size */ - uint_t channels = 2; /* number of channel */ uint_t n_filters = 40; /* number of filters */ - cvec_t *in = new_cvec (win_s, channels); /* input buffer */ - fvec_t *out = new_fvec (win_s, channels); /* input buffer */ - fvec_t *coeffs = NULL; + cvec_t *in = new_cvec (win_s); /* input buffer */ + fvec_t *out = new_fvec (win_s); /* input buffer */ + fmat_t *coeffs = NULL; smpl_t samplerate = 16000.; /* allocate fft and other memory space */ @@ -26,7 +25,7 @@ main (void) return -1; } - //fvec_print (coeffs); + //fmat_print (coeffs); //fprintf(stderr, "%f\n", fvec_sum(coeffs)); diff --git a/tests/src/test-fvec.c b/tests/src/test-fvec.c index 8fa1f7c6..d51feece 100644 --- a/tests/src/test-fvec.c +++ b/tests/src/test-fvec.c @@ -3,8 +3,7 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t * in = new_fvec (win_s, channels); /* input buffer */ + fvec_t * in = new_fvec (win_s); /* input buffer */ del_fvec(in); return 0; diff --git a/tests/src/test-hist.c b/tests/src/test-hist.c index 5c87b501..9cd39e58 100644 --- a/tests/src/test-hist.c +++ b/tests/src/test-hist.c @@ -7,7 +7,7 @@ int main( ) { uint_t length; for (length = 1; length < 10; length ++ ) { - aubio_hist_t *o = new_aubio_hist(0, 1, length, 5); + aubio_hist_t *o = new_aubio_hist(0, 1, length); fvec_t *t = new_aubio_window("hanning", length); aubio_hist_do(o,t); fvec_print(t); diff --git a/tests/src/test-mfcc.c b/tests/src/test-mfcc.c index a41f64bd..c724d104 100644 --- a/tests/src/test-mfcc.c +++ b/tests/src/test-mfcc.c @@ -5,11 +5,10 @@ main (void) { /* allocate some memory */ uint_t win_s = 512; /* fft size */ - uint_t channels = 1; /* number of channel */ uint_t n_filters = 40; /* number of filters */ uint_t n_coefs = 13; /* number of coefficients */ - cvec_t *in = new_cvec (win_s, channels); /* input buffer */ - fvec_t *out = new_fvec (n_coefs, channels); /* input buffer */ + cvec_t *in = new_cvec (win_s); /* input buffer */ + fvec_t *out = new_fvec (n_coefs); /* input buffer */ smpl_t samplerate = 16000.; /* allocate fft and other memory space */ diff --git a/tests/src/test-onset.c b/tests/src/test-onset.c index db94669a..fd2ab2e4 100644 --- a/tests/src/test-onset.c +++ b/tests/src/test-onset.c @@ -3,10 +3,9 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t * in = new_fvec (win_s/4, channels); /* input buffer */ - fvec_t * out = new_fvec (2, channels); /* input buffer */ - aubio_onset_t * onset = new_aubio_onset("complex", win_s, win_s/4, channels, 44100.); + fvec_t * in = new_fvec (win_s/4); /* input buffer */ + fvec_t * out = new_fvec (2); /* input buffer */ + aubio_onset_t * onset = new_aubio_onset("complex", win_s, win_s/4, 44100.); uint_t i = 0; while (i < 10) { diff --git a/tests/src/test-onsetdetection.c b/tests/src/test-onsetdetection.c index 8234d98c..fe1b71b7 100644 --- a/tests/src/test-onsetdetection.c +++ b/tests/src/test-onsetdetection.c @@ -7,37 +7,36 @@ int main () { uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - cvec_t *in = new_cvec (win_s, channels); /* input buffer */ - fvec_t *out = new_fvec (1, channels); /* input buffer */ + cvec_t *in = new_cvec (win_s); /* input buffer */ + fvec_t *out = new_fvec (1); /* input buffer */ aubio_specdesc_t *o; - o = new_aubio_specdesc ("energy", win_s, channels); + o = new_aubio_specdesc ("energy", win_s); aubio_specdesc_do (o, in, out); del_aubio_specdesc (o); - o = new_aubio_specdesc ("energy", win_s, channels); + o = new_aubio_specdesc ("energy", win_s); aubio_specdesc_do (o, in, out); del_aubio_specdesc (o); - o = new_aubio_specdesc ("hfc", win_s, channels); + o = new_aubio_specdesc ("hfc", win_s); aubio_specdesc_do (o, in, out); del_aubio_specdesc (o); - o = new_aubio_specdesc ("complex", win_s, channels); + o = new_aubio_specdesc ("complex", win_s); aubio_specdesc_do (o, in, out); del_aubio_specdesc (o); - o = new_aubio_specdesc ("phase", win_s, channels); + o = new_aubio_specdesc ("phase", win_s); aubio_specdesc_do (o, in, out); del_aubio_specdesc (o); - o = new_aubio_specdesc ("kl", win_s, channels); + o = new_aubio_specdesc ("kl", win_s); aubio_specdesc_do (o, in, out); del_aubio_specdesc (o); - o = new_aubio_specdesc ("mkl", win_s, channels); + o = new_aubio_specdesc ("mkl", win_s); aubio_specdesc_do (o, in, out); del_aubio_specdesc (o); diff --git a/tests/src/test-peakpick.c b/tests/src/test-peakpick.c index 1e443181..42aff7dc 100644 --- a/tests/src/test-peakpick.c +++ b/tests/src/test-peakpick.c @@ -5,9 +5,8 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t * in = new_fvec (win_s, channels); /* input buffer */ - fvec_t * out = new_fvec (1, channels); /* input buffer */ + fvec_t * in = new_fvec (win_s); /* input buffer */ + fvec_t * out = new_fvec (1); /* input buffer */ aubio_peakpicker_t * o = new_aubio_peakpicker(1); aubio_peakpicker_set_threshold (o, 0.3); diff --git a/tests/src/test-phasevoc-jack.c b/tests/src/test-phasevoc-jack.c index cd5753a1..d42bdd3c 100644 --- a/tests/src/test-phasevoc-jack.c +++ b/tests/src/test-phasevoc-jack.c @@ -21,21 +21,24 @@ uint_t midiin = 4; /* number of midi input channels */ uint_t midiout = 2; /* number of midi output channels */ uint_t pos = 0; /* frames%dspblocksize for jack loop */ -fvec_t * in; -cvec_t * fftgrain; -fvec_t * out; +fvec_t * in[2]; +cvec_t * fftgrain[2]; +fvec_t * out[2]; -aubio_pvoc_t * pv; +aubio_pvoc_t * pv[2]; int aubio_process(float **input, float **output, int nframes); int main(){ /* allocate some memory */ - in = new_fvec (hop_s, channels); /* input buffer */ - fftgrain = new_cvec (win_s, channels); /* fft norm and phase */ - out = new_fvec (hop_s, channels); /* output buffer */ + uint_t i; + for (i=0;ilength;i++) fftgrain->phas[0][i] = 0.; + for (i=0;ilength;i++) fftgrain[0]->phas[i] = 0.; // double phases of second channel - for (i=0;ilength;i++) { - fftgrain->phas[1][i] = - aubio_unwrap2pi (fftgrain->phas[1][i] * 2.); + for (i=0;ilength;i++) { + fftgrain[1]->phas[i] = + aubio_unwrap2pi (fftgrain[1]->phas[i] * 2.); } // copy second channel to third one - aubio_pvoc_rdo(pv,fftgrain,out); + aubio_pvoc_rdo(pv[i], fftgrain[i], out[i]); pos = -1; } + } pos++; } return 0; diff --git a/tests/src/test-phasevoc.c b/tests/src/test-phasevoc.c index e8352abf..6bea4c39 100644 --- a/tests/src/test-phasevoc.c +++ b/tests/src/test-phasevoc.c @@ -6,13 +6,12 @@ int main(){ uint_t win_s = 1024; /* window size */ uint_t hop_s = 256; /* hop size */ - uint_t channels = 4; /* number of channels */ /* allocate some memory */ - fvec_t * in = new_fvec (hop_s, channels); /* input buffer */ - cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */ - fvec_t * out = new_fvec (hop_s, channels); /* output buffer */ + fvec_t * in = new_fvec (hop_s); /* input buffer */ + cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */ + fvec_t * out = new_fvec (hop_s); /* output buffer */ /* allocate fft and other memory space */ - aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s,channels); + aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s); /* fill input with some data */ printf("initialised\n"); /* execute stft */ diff --git a/tests/src/test-pitchdetection.c b/tests/src/test-pitchdetection.c index 7872b86f..ac884c69 100644 --- a/tests/src/test-pitchdetection.c +++ b/tests/src/test-pitchdetection.c @@ -7,11 +7,10 @@ main () uint_t win_s = 1024; /* window size */ uint_t hop_s = win_s / 4; /* hop size */ uint_t samplerate = 44100; /* samplerate */ - uint_t channels = 1; /* number of channel */ - fvec_t *in = new_fvec (hop_s, channels); /* input buffer */ - fvec_t *out = new_fvec (1, channels); /* input buffer */ + fvec_t *in = new_fvec (hop_s); /* input buffer */ + fvec_t *out = new_fvec (1); /* input buffer */ aubio_pitch_t *o = - new_aubio_pitch ("default", win_s, hop_s, channels, samplerate); + new_aubio_pitch ("default", win_s, hop_s, samplerate); uint_t i = 0; while (i < 100) { diff --git a/tests/src/test-pitchfcomb.c b/tests/src/test-pitchfcomb.c index a6fb74a4..dda60995 100644 --- a/tests/src/test-pitchfcomb.c +++ b/tests/src/test-pitchfcomb.c @@ -6,11 +6,10 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ uint_t hop_s = win_s/4; /* hop size */ - uint_t channels = 3; /* number of channel */ - fvec_t * in = new_fvec (hop_s, channels); /* input buffer */ - fvec_t * out = new_fvec (1, channels); + fvec_t * in = new_fvec (hop_s); /* input buffer */ + fvec_t * out = new_fvec (1); aubio_pitchfcomb_t * o = new_aubio_pitchfcomb ( - win_s, hop_s, channels); + win_s, hop_s); uint_t i = 0; while (i < 2) { diff --git a/tests/src/test-pitchmcomb.c b/tests/src/test-pitchmcomb.c index aaecc3d3..7d3cb16b 100644 --- a/tests/src/test-pitchmcomb.c +++ b/tests/src/test-pitchmcomb.c @@ -6,11 +6,10 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ uint_t hop_s = win_s/4; /* hop size */ - uint_t channels = 1; /* number of channel */ - cvec_t * in = new_cvec (win_s, channels); /* input buffer */ - fvec_t * out = new_fvec (1, channels); /* input buffer */ + cvec_t * in = new_cvec (win_s); /* input buffer */ + fvec_t * out = new_fvec (1); /* input buffer */ - aubio_pitchmcomb_t * o = new_aubio_pitchmcomb(win_s, hop_s, channels); + aubio_pitchmcomb_t * o = new_aubio_pitchmcomb(win_s, hop_s); uint_t i = 0; while (i < 1000) { diff --git a/tests/src/test-pitchschmitt.c b/tests/src/test-pitchschmitt.c index 08500a72..745feca8 100644 --- a/tests/src/test-pitchschmitt.c +++ b/tests/src/test-pitchschmitt.c @@ -5,8 +5,8 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - fvec_t * in = new_fvec (win_s, 1); /* input buffer */ - fvec_t * out = new_fvec (1, 1); /* input buffer */ + fvec_t * in = new_fvec (win_s); /* input buffer */ + fvec_t * out = new_fvec (1); /* input buffer */ aubio_pitchschmitt_t * o = new_aubio_pitchschmitt(win_s); uint_t i = 0; diff --git a/tests/src/test-pitchyin.c b/tests/src/test-pitchyin.c index 719c30ff..1e256e86 100644 --- a/tests/src/test-pitchyin.c +++ b/tests/src/test-pitchyin.c @@ -5,9 +5,8 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t * in = new_fvec (win_s, channels); /* input buffer */ - fvec_t * out = new_fvec (win_s/2, channels); /* input buffer */ + fvec_t * in = new_fvec (win_s); /* input buffer */ + fvec_t * out = new_fvec (win_s/2); /* input buffer */ aubio_pitchyin_t *p = new_aubio_pitchyin (win_s); uint_t i = 0; diff --git a/tests/src/test-pitchyinfft.c b/tests/src/test-pitchyinfft.c index 93bb0ce5..96939ce8 100644 --- a/tests/src/test-pitchyinfft.c +++ b/tests/src/test-pitchyinfft.c @@ -5,9 +5,8 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t * in = new_fvec (win_s, channels); /* input buffer */ - fvec_t * out = new_fvec (1, channels); /* output pitch periods */ + fvec_t * in = new_fvec (win_s); /* input buffer */ + fvec_t * out = new_fvec (1); /* output pitch periods */ aubio_pitchyinfft_t * o = new_aubio_pitchyinfft(win_s); aubio_pitchyinfft_set_tolerance (o, 0.2); uint_t i = 0; diff --git a/tests/src/test-resample.c b/tests/src/test-resample.c index c8d08c85..b28bf9a9 100644 --- a/tests/src/test-resample.c +++ b/tests/src/test-resample.c @@ -6,10 +6,9 @@ main () { /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ smpl_t ratio = 0.5; - fvec_t *in = new_fvec (win_s, channels); /* input buffer */ - fvec_t *out = new_fvec ((uint_t) (win_s * ratio), channels); /* input buffer */ + fvec_t *in = new_fvec (win_s); /* input buffer */ + fvec_t *out = new_fvec ((uint_t) (win_s * ratio)); /* input buffer */ aubio_resampler_t *o = new_aubio_resampler (0.5, 0); uint_t i = 0; diff --git a/tests/src/test-scale.c b/tests/src/test-scale.c index 3fc72025..3f94eb2b 100644 --- a/tests/src/test-scale.c +++ b/tests/src/test-scale.c @@ -5,8 +5,7 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t * in = new_fvec (win_s, channels); /* input buffer */ + fvec_t * in = new_fvec (win_s); /* input buffer */ aubio_scale_t * o = new_aubio_scale(0,1,2,3); aubio_scale_set_limits (o,0,1,2,3); uint_t i = 0; diff --git a/tests/src/test-tempo.c b/tests/src/test-tempo.c index b2d636ac..3a6c2831 100644 --- a/tests/src/test-tempo.c +++ b/tests/src/test-tempo.c @@ -4,10 +4,9 @@ int main(){ /* allocate some memory */ uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t * in = new_fvec (win_s, channels); /* input buffer */ - fvec_t * out = new_fvec (2, channels); /* input buffer */ - aubio_tempo_t * o = new_aubio_tempo("complex", win_s, win_s/4, channels, 44100.); + fvec_t * in = new_fvec (win_s); /* input buffer */ + fvec_t * out = new_fvec (2); /* input buffer */ + aubio_tempo_t * o = new_aubio_tempo("complex", win_s, win_s/4, 44100.); uint_t i = 0; smpl_t curtempo, curtempoconf; diff --git a/tests/src/test-tss.c b/tests/src/test-tss.c index b8ac41cd..00401687 100644 --- a/tests/src/test-tss.c +++ b/tests/src/test-tss.c @@ -13,20 +13,19 @@ int main(){ int i; uint_t win_s = 1024; /* window size */ uint_t hop_s = 256; /* hop size */ - uint_t channels = 4; /* number of channels */ /* allocate some memory */ - fvec_t * in = new_fvec (hop_s, channels); /* input buffer */ - cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */ - cvec_t * cstead = new_cvec (win_s, channels); /* fft norm and phase */ - cvec_t * ctrans = new_cvec (win_s, channels); /* fft norm and phase */ - fvec_t * stead = new_fvec (hop_s, channels); /* output buffer */ - fvec_t * trans = new_fvec (hop_s, channels); /* output buffer */ + fvec_t * in = new_fvec (hop_s); /* input buffer */ + cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */ + cvec_t * cstead = new_cvec (win_s); /* fft norm and phase */ + cvec_t * ctrans = new_cvec (win_s); /* fft norm and phase */ + fvec_t * stead = new_fvec (hop_s); /* output buffer */ + fvec_t * trans = new_fvec (hop_s); /* output buffer */ /* allocate fft and other memory space */ - aubio_pvoc_t * pv = new_aubio_pvoc (win_s,hop_s,channels); - aubio_pvoc_t * pvt = new_aubio_pvoc(win_s,hop_s,channels); - aubio_pvoc_t * pvs = new_aubio_pvoc(win_s,hop_s,channels); + aubio_pvoc_t * pv = new_aubio_pvoc (win_s,hop_s); + aubio_pvoc_t * pvt = new_aubio_pvoc(win_s,hop_s); + aubio_pvoc_t * pvs = new_aubio_pvoc(win_s,hop_s); - aubio_tss_t * tss = new_aubio_tss(win_s,hop_s,channels); + aubio_tss_t * tss = new_aubio_tss(win_s,hop_s); /* fill input with some data */ printf("initialised\n"); /* execute stft */