From 972094546fff148a563475e76050a1d4e98f9cbc Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 1 Oct 2017 16:00:07 +0200 Subject: [PATCH] tests/: undo changes, removing calls to aubio_init --- tests/src/io/test-sink-multi.c | 5 ----- tests/src/io/test-sink.c | 5 ----- tests/src/io/test-sink_apple_audio-multi.c | 5 ----- tests/src/io/test-sink_apple_audio.c | 5 ----- tests/src/io/test-sink_sndfile-multi.c | 5 ----- tests/src/io/test-sink_sndfile.c | 5 ----- tests/src/io/test-sink_wavwrite-multi.c | 5 ----- tests/src/io/test-sink_wavwrite.c | 5 ----- tests/src/io/test-source.c | 3 --- tests/src/io/test-source_apple_audio.c | 5 ----- tests/src/io/test-source_avcodec.c | 5 ----- tests/src/io/test-source_multi.c | 4 ---- tests/src/io/test-source_seek.c | 5 ----- tests/src/io/test-source_sndfile.c | 5 ----- tests/src/io/test-source_wavread.c | 5 ----- tests/src/onset/test-onset.c | 2 -- tests/src/pitch/test-pitch.c | 2 -- tests/src/pitch/test-pitchfcomb.c | 1 - tests/src/pitch/test-pitchmcomb.c | 2 -- tests/src/pitch/test-pitchschmitt.c | 1 - tests/src/pitch/test-pitchspecacf.c | 2 -- tests/src/pitch/test-pitchyin.c | 2 -- tests/src/pitch/test-pitchyinfft.c | 2 -- tests/src/spectral/test-awhitening.c | 3 --- tests/src/spectral/test-fft.c | 4 ---- tests/src/spectral/test-filterbank.c | 3 --- tests/src/spectral/test-filterbank_mel.c | 3 --- tests/src/spectral/test-mfcc.c | 3 --- tests/src/spectral/test-phasevoc.c | 3 --- tests/src/spectral/test-specdesc.c | 3 --- tests/src/spectral/test-tss.c | 2 -- tests/src/synth/test-sampler.c | 3 --- tests/src/synth/test-wavetable.c | 3 --- tests/src/tempo/test-beattracking.c | 3 --- tests/src/tempo/test-tempo.c | 3 --- tests/src/temporal/test-a_weighting.c | 5 +---- tests/src/temporal/test-biquad.c | 4 ---- tests/src/temporal/test-c_weighting.c | 4 ---- tests/src/temporal/test-filter.c | 3 --- tests/src/temporal/test-resampler.c | 4 ---- tests/src/test-cvec.c | 5 ----- tests/src/test-delnull.c | 5 ----- tests/src/test-fmat.c | 5 ----- tests/src/test-fvec.c | 4 ---- tests/src/test-lvec.c | 5 ----- tests/src/test-mathutils-window.c | 5 ----- tests/src/test-mathutils.c | 5 ----- tests/src/utils/test-hist.c | 5 ----- tests/src/utils/test-log.c | 4 ---- tests/src/utils/test-parameter.c | 4 ---- tests/src/utils/test-scale.c | 4 ---- 51 files changed, 1 insertion(+), 192 deletions(-) diff --git a/tests/src/io/test-sink-multi.c b/tests/src/io/test-sink-multi.c index 430083d0..2ddb6fbb 100644 --- a/tests/src/io/test-sink-multi.c +++ b/tests/src/io/test-sink-multi.c @@ -6,8 +6,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 3) { @@ -70,8 +68,5 @@ beach_sink: beach_fmat: del_aubio_source(i); beach_source: - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-sink.c b/tests/src/io/test-sink.c index 4b3626b6..2f04177b 100644 --- a/tests/src/io/test-sink.c +++ b/tests/src/io/test-sink.c @@ -3,8 +3,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 3) { @@ -56,8 +54,5 @@ beach_sink: beach_source: del_fvec(vec); beach_fvec: - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-sink_apple_audio-multi.c b/tests/src/io/test-sink_apple_audio-multi.c index 3ecb8c65..1017176f 100644 --- a/tests/src/io/test-sink_apple_audio-multi.c +++ b/tests/src/io/test-sink_apple_audio-multi.c @@ -7,8 +7,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 3) { @@ -76,8 +74,5 @@ beach_source: err = 3; PRINT_ERR("aubio was not compiled with aubio_sink_apple_audio\n"); #endif /* HAVE_SINK_APPLE_AUDIO */ - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-sink_apple_audio.c b/tests/src/io/test-sink_apple_audio.c index b794c6fa..86d17696 100644 --- a/tests/src/io/test-sink_apple_audio.c +++ b/tests/src/io/test-sink_apple_audio.c @@ -7,8 +7,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 3) { @@ -65,8 +63,5 @@ beach_fvec: err = 3; PRINT_ERR("aubio was not compiled with aubio_source_apple_audio\n"); #endif /* HAVE_SINK_APPLE_AUDIO */ - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-sink_sndfile-multi.c b/tests/src/io/test-sink_sndfile-multi.c index 565a6ccc..d06911c0 100644 --- a/tests/src/io/test-sink_sndfile-multi.c +++ b/tests/src/io/test-sink_sndfile-multi.c @@ -7,8 +7,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 3) { @@ -76,8 +74,5 @@ beach_source: err = 3; PRINT_ERR("aubio was not compiled with aubio_sink_sndfile\n"); #endif /* HAVE_SNDFILE */ - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-sink_sndfile.c b/tests/src/io/test-sink_sndfile.c index 56d211f3..fe95310a 100644 --- a/tests/src/io/test-sink_sndfile.c +++ b/tests/src/io/test-sink_sndfile.c @@ -7,8 +7,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 3) { @@ -65,8 +63,5 @@ beach_fvec: err = 3; PRINT_ERR("aubio was not compiled with aubio_source_sndfile\n"); #endif /* HAVE_SNDFILE */ - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-sink_wavwrite-multi.c b/tests/src/io/test-sink_wavwrite-multi.c index e0ff643c..32a8abfc 100644 --- a/tests/src/io/test-sink_wavwrite-multi.c +++ b/tests/src/io/test-sink_wavwrite-multi.c @@ -7,8 +7,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 3) { @@ -76,8 +74,5 @@ beach_source: err = 3; PRINT_ERR("aubio was not compiled with aubio_sink_wavwrite\n"); #endif /* HAVE_WAVWRITE */ - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-sink_wavwrite.c b/tests/src/io/test-sink_wavwrite.c index fbca3076..2e758e34 100644 --- a/tests/src/io/test-sink_wavwrite.c +++ b/tests/src/io/test-sink_wavwrite.c @@ -7,8 +7,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 3) { @@ -65,8 +63,5 @@ beach_fvec: err = 3; PRINT_ERR("aubio was not compiled with aubio_sink_wavwrite\n"); #endif /* HAVE_WAVWRITE */ - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-source.c b/tests/src/io/test-source.c index ef7ed4d7..a1f17aeb 100644 --- a/tests/src/io/test-source.c +++ b/tests/src/io/test-source.c @@ -3,8 +3,6 @@ int main (int argc, char **argv) { - aubio_init(); - uint_t err = 0; if (argc < 2) { err = 2; @@ -57,6 +55,5 @@ int main (int argc, char **argv) del_fvec (vec); del_aubio_source (s); beach: - aubio_cleanup(); return err; } diff --git a/tests/src/io/test-source_apple_audio.c b/tests/src/io/test-source_apple_audio.c index 09afcee5..92d0e542 100644 --- a/tests/src/io/test-source_apple_audio.c +++ b/tests/src/io/test-source_apple_audio.c @@ -7,8 +7,6 @@ int main (int argc, char **argv) { - aubio_init(); - uint_t err = 0; if (argc < 2) { err = 2; @@ -61,8 +59,5 @@ beach: err = 3; PRINT_ERR("aubio was not compiled with aubio_source_apple_audio\n"); #endif /* HAVE_SOURCE_APPLE_AUDIO */ - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-source_avcodec.c b/tests/src/io/test-source_avcodec.c index 9c74051a..dc23d76c 100644 --- a/tests/src/io/test-source_avcodec.c +++ b/tests/src/io/test-source_avcodec.c @@ -7,8 +7,6 @@ int main (int argc, char **argv) { - aubio_init(); - uint_t err = 0; if (argc < 2) { err = 2; @@ -61,8 +59,5 @@ beach: err = 3; PRINT_ERR("aubio was not compiled with aubio_source_avcodec\n"); #endif /* HAVE_LIBAV */ - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-source_multi.c b/tests/src/io/test-source_multi.c index 738911f6..b3b4683b 100644 --- a/tests/src/io/test-source_multi.c +++ b/tests/src/io/test-source_multi.c @@ -3,8 +3,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 2) { err = -2; @@ -55,7 +53,5 @@ int main (int argc, char **argv) del_aubio_source (s); beach: - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-source_seek.c b/tests/src/io/test-source_seek.c index 8b99da5f..773aefee 100644 --- a/tests/src/io/test-source_seek.c +++ b/tests/src/io/test-source_seek.c @@ -3,8 +3,6 @@ int main (int argc, char **argv) { - aubio_init(); - uint_t err = 0; if (argc < 2) { err = 2; @@ -90,8 +88,5 @@ beach: assert ( old_n_frames_2 == old_n_frames_1 ); // check that we got about half the frames, with 3 decimals assert ( roundf(1.e3 * old_n_frames_1 / old_n_frames_3) / 1.e3 == 2.); - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-source_sndfile.c b/tests/src/io/test-source_sndfile.c index a9dcd2cb..6dfff59d 100644 --- a/tests/src/io/test-source_sndfile.c +++ b/tests/src/io/test-source_sndfile.c @@ -7,8 +7,6 @@ int main (int argc, char **argv) { - aubio_init(); - uint_t err = 0; if (argc < 2) { err = 2; @@ -61,8 +59,5 @@ beach: err = 3; PRINT_ERR("aubio was not compiled with aubio_source_sndfile\n"); #endif /* HAVE_SNDFILE */ - - aubio_cleanup(); - return err; } diff --git a/tests/src/io/test-source_wavread.c b/tests/src/io/test-source_wavread.c index d9f62395..23511cac 100644 --- a/tests/src/io/test-source_wavread.c +++ b/tests/src/io/test-source_wavread.c @@ -7,8 +7,6 @@ int main (int argc, char **argv) { - aubio_init(); - uint_t err = 0; if (argc < 2) { err = 2; @@ -62,8 +60,5 @@ beach: err = 3; PRINT_ERR("aubio was not compiled with aubio_source_wavread\n"); #endif /* HAVE_WAVREAD */ - - aubio_cleanup(); - return err; } diff --git a/tests/src/onset/test-onset.c b/tests/src/onset/test-onset.c index a305556d..d1476b04 100644 --- a/tests/src/onset/test-onset.c +++ b/tests/src/onset/test-onset.c @@ -3,8 +3,6 @@ int main (int argc, char **argv) { - aubio_init(); - uint_t err = 0; if (argc < 2) { err = 2; diff --git a/tests/src/pitch/test-pitch.c b/tests/src/pitch/test-pitch.c index edccefa3..1509870f 100644 --- a/tests/src/pitch/test-pitch.c +++ b/tests/src/pitch/test-pitch.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - // 1. allocate some memory uint_t n = 0; // frame counter uint_t win_s = 1024; // window size diff --git a/tests/src/pitch/test-pitchfcomb.c b/tests/src/pitch/test-pitchfcomb.c index 1c1344c2..718537b8 100644 --- a/tests/src/pitch/test-pitchfcomb.c +++ b/tests/src/pitch/test-pitchfcomb.c @@ -7,7 +7,6 @@ int main (void) { - aubio_init(); uint_t i = 0; uint_t win_s = 1024; // window size uint_t hop_s = win_s/4; // hop size diff --git a/tests/src/pitch/test-pitchmcomb.c b/tests/src/pitch/test-pitchmcomb.c index fe0dfb08..9e8483b9 100644 --- a/tests/src/pitch/test-pitchmcomb.c +++ b/tests/src/pitch/test-pitchmcomb.c @@ -7,8 +7,6 @@ int main (void) { - aubio_init(); - uint_t n = 10; // compute n times uint_t win_s = 1024; // window size uint_t hop_s = win_s/4; // hop size diff --git a/tests/src/pitch/test-pitchschmitt.c b/tests/src/pitch/test-pitchschmitt.c index a6267e9a..bae7f812 100644 --- a/tests/src/pitch/test-pitchschmitt.c +++ b/tests/src/pitch/test-pitchschmitt.c @@ -7,7 +7,6 @@ int main (void) { - aubio_init(); uint_t n = 10; // compute n times uint_t win_s = 1024; // window size // create some vectors diff --git a/tests/src/pitch/test-pitchspecacf.c b/tests/src/pitch/test-pitchspecacf.c index 9688b70c..5a4fa238 100644 --- a/tests/src/pitch/test-pitchspecacf.c +++ b/tests/src/pitch/test-pitchspecacf.c @@ -7,8 +7,6 @@ int main (void) { - aubio_init(); - uint_t n = 10; // compute n times uint_t win_s = 1024; // window size // create some vectors diff --git a/tests/src/pitch/test-pitchyin.c b/tests/src/pitch/test-pitchyin.c index 87ccf1d9..9b45c55a 100644 --- a/tests/src/pitch/test-pitchyin.c +++ b/tests/src/pitch/test-pitchyin.c @@ -7,8 +7,6 @@ int main (void) { - aubio_init(); - uint_t n = 10; // compute n times uint_t win_s = 1024; // window size // create some vectors diff --git a/tests/src/pitch/test-pitchyinfft.c b/tests/src/pitch/test-pitchyinfft.c index 714f2f66..ee1ece8a 100644 --- a/tests/src/pitch/test-pitchyinfft.c +++ b/tests/src/pitch/test-pitchyinfft.c @@ -7,8 +7,6 @@ int main (void) { - aubio_init(); - uint_t n = 10; // compute n times uint_t win_s = 1024; // window size // create some vectors diff --git a/tests/src/spectral/test-awhitening.c b/tests/src/spectral/test-awhitening.c index b66ebb22..e483141f 100644 --- a/tests/src/spectral/test-awhitening.c +++ b/tests/src/spectral/test-awhitening.c @@ -3,8 +3,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 3) { @@ -81,7 +79,6 @@ beach_sink: beach_source: del_fvec(vec); beach_fvec: - aubio_cleanup(); return err; } diff --git a/tests/src/spectral/test-fft.c b/tests/src/spectral/test-fft.c index cdf1abe8..4d5a5fbb 100644 --- a/tests/src/spectral/test-fft.c +++ b/tests/src/spectral/test-fft.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - int return_code = 0; uint_t i, n_iters = 100; // number of iterations uint_t win_s = 512; // window size @@ -45,8 +43,6 @@ beach: del_fvec(in); del_cvec(fftgrain); del_fvec(out); - aubio_cleanup(); - return return_code; } diff --git a/tests/src/spectral/test-filterbank.c b/tests/src/spectral/test-filterbank.c index 27017b39..543226d0 100644 --- a/tests/src/spectral/test-filterbank.c +++ b/tests/src/spectral/test-filterbank.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - uint_t win_s = 1024; // window size uint_t n_filters = 13; // number of filters @@ -35,7 +33,6 @@ int main (void) del_aubio_filterbank (o); del_cvec (in_spec); del_fvec (out_filters); - aubio_cleanup (); return 0; diff --git a/tests/src/spectral/test-filterbank_mel.c b/tests/src/spectral/test-filterbank_mel.c index a2fba1c5..0a0c670c 100644 --- a/tests/src/spectral/test-filterbank_mel.c +++ b/tests/src/spectral/test-filterbank_mel.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - uint_t samplerate = 16000; // samplerate of signal to filter uint_t win_s = 512; // fft size uint_t n_filters = 40; // number of filters @@ -34,7 +32,6 @@ int main (void) del_aubio_filterbank (o); del_cvec (in_spec); del_fvec (out_filters); - aubio_cleanup (); return 0; diff --git a/tests/src/spectral/test-mfcc.c b/tests/src/spectral/test-mfcc.c index bb6eedd3..23f8c64e 100644 --- a/tests/src/spectral/test-mfcc.c +++ b/tests/src/spectral/test-mfcc.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - uint_t win_s = 512; // fft size uint_t n_filters = 40; // number of filters uint_t n_coefs = 13; // number of coefficients @@ -26,7 +24,6 @@ int main (void) del_aubio_mfcc (o); del_cvec (in); del_fvec (out); - aubio_cleanup (); return 0; diff --git a/tests/src/spectral/test-phasevoc.c b/tests/src/spectral/test-phasevoc.c index 40dc7371..12af4e6c 100644 --- a/tests/src/spectral/test-phasevoc.c +++ b/tests/src/spectral/test-phasevoc.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - uint_t n = 6; // compute n times uint_t win_s = 32; // window size uint_t hop_s = win_s / 4; // hop size @@ -43,7 +41,6 @@ int main (void) del_cvec(fftgrain); del_fvec(out); del_aubio_pvoc(pv); - aubio_cleanup(); return 0; diff --git a/tests/src/spectral/test-specdesc.c b/tests/src/spectral/test-specdesc.c index fc10ae37..f890e59b 100644 --- a/tests/src/spectral/test-specdesc.c +++ b/tests/src/spectral/test-specdesc.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - uint_t win_s = 1024; // window size cvec_t *in = new_cvec (win_s); // input buffer fvec_t *out = new_fvec (1); // output spectral descriptor @@ -40,7 +38,6 @@ int main (void) del_cvec (in); del_fvec (out); - aubio_cleanup (); return 0; diff --git a/tests/src/spectral/test-tss.c b/tests/src/spectral/test-tss.c index 12bf25bc..0e18b200 100644 --- a/tests/src/spectral/test-tss.c +++ b/tests/src/spectral/test-tss.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - uint_t n = 10; // compute n times uint_t win_s = 1024; // window size uint_t hop_s = 256; // hop size diff --git a/tests/src/synth/test-sampler.c b/tests/src/synth/test-sampler.c index aca756bb..0f3bfa7d 100644 --- a/tests/src/synth/test-sampler.c +++ b/tests/src/synth/test-sampler.c @@ -3,8 +3,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 4) { @@ -55,7 +53,6 @@ int main (int argc, char **argv) del_aubio_source(source); del_aubio_sink(sink); del_fvec(vec); - aubio_cleanup(); return 0; diff --git a/tests/src/synth/test-wavetable.c b/tests/src/synth/test-wavetable.c index 2f7ced02..f569277c 100644 --- a/tests/src/synth/test-wavetable.c +++ b/tests/src/synth/test-wavetable.c @@ -3,8 +3,6 @@ int main (int argc, char **argv) { - aubio_init(); - sint_t err = 0; if (argc < 2) { @@ -64,7 +62,6 @@ int main (int argc, char **argv) del_aubio_wavetable (wavetable); del_aubio_sink(sink); del_fvec(vec); - aubio_cleanup(); return 0; diff --git a/tests/src/tempo/test-beattracking.c b/tests/src/tempo/test-beattracking.c index 63f6c50d..323e493c 100644 --- a/tests/src/tempo/test-beattracking.c +++ b/tests/src/tempo/test-beattracking.c @@ -5,8 +5,6 @@ int main (void) { - aubio_init(); - uint_t i = 0; uint_t win_s = 1024; // window size fvec_t * in = new_fvec (win_s); // input buffer @@ -35,7 +33,6 @@ int main (void) del_aubio_beattracking(tempo); del_fvec(in); del_fvec(out); - aubio_cleanup(); return 0; diff --git a/tests/src/tempo/test-tempo.c b/tests/src/tempo/test-tempo.c index 94ef62fd..7a878326 100644 --- a/tests/src/tempo/test-tempo.c +++ b/tests/src/tempo/test-tempo.c @@ -3,8 +3,6 @@ int main (int argc, char **argv) { - aubio_init(); - uint_t err = 0; if (argc < 2) { err = 2; @@ -58,7 +56,6 @@ int main (int argc, char **argv) del_fvec(in); del_fvec(out); del_aubio_source(source); - beach: aubio_cleanup(); diff --git a/tests/src/temporal/test-a_weighting.c b/tests/src/temporal/test-a_weighting.c index 0b417017..4030a0db 100644 --- a/tests/src/temporal/test-a_weighting.c +++ b/tests/src/temporal/test-a_weighting.c @@ -2,8 +2,7 @@ int main (void) { - aubio_init(); - + aubio_filter_t * f; uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000}; @@ -39,8 +38,6 @@ int main (void) } del_aubio_filter (f); - aubio_cleanup(); - return 0; } diff --git a/tests/src/temporal/test-biquad.c b/tests/src/temporal/test-biquad.c index 3c50f682..8317b062 100644 --- a/tests/src/temporal/test-biquad.c +++ b/tests/src/temporal/test-biquad.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - uint_t win_s = 64; // window size // create biquad filter with `b0`, `b1`, `b2`, `a1`, `a2` @@ -30,7 +28,5 @@ int main (void) del_fvec(tmp_vec); del_fvec(out_vec); - aubio_cleanup(); - return 0; } diff --git a/tests/src/temporal/test-c_weighting.c b/tests/src/temporal/test-c_weighting.c index f06bed42..84380c9b 100644 --- a/tests/src/temporal/test-c_weighting.c +++ b/tests/src/temporal/test-c_weighting.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - aubio_filter_t * f; uint_t rates[] = { 8000, 16000, 22050, 44100, 96000, 192000}; @@ -39,8 +37,6 @@ int main (void) } del_aubio_filter (f); - aubio_cleanup(); - return 0; } diff --git a/tests/src/temporal/test-filter.c b/tests/src/temporal/test-filter.c index 5fe75a3b..260d81b0 100644 --- a/tests/src/temporal/test-filter.c +++ b/tests/src/temporal/test-filter.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - uint_t win_s = 16; // window size uint_t impulse_at = win_s / 2; fvec_t *in = new_fvec (win_s); // input buffer @@ -31,7 +29,6 @@ int main (void) del_fvec (in); del_fvec (out); del_aubio_filter (o); - aubio_cleanup (); return 0; diff --git a/tests/src/temporal/test-resampler.c b/tests/src/temporal/test-resampler.c index 8e4032a0..ee818e12 100644 --- a/tests/src/temporal/test-resampler.c +++ b/tests/src/temporal/test-resampler.c @@ -2,8 +2,6 @@ int main (void) { - aubio_init(); - uint_t win_s = 1024; // window size smpl_t ratio = 0.5; fvec_t *in = new_fvec (win_s); // input buffer @@ -20,7 +18,5 @@ int main (void) del_fvec (in); del_fvec (out); - aubio_cleanup(); - return 0; } diff --git a/tests/src/test-cvec.c b/tests/src/test-cvec.c index 02975a6b..c1e6bca6 100644 --- a/tests/src/test-cvec.c +++ b/tests/src/test-cvec.c @@ -3,8 +3,6 @@ int main (void) { - aubio_init(); - uint_t i, window_size = 16; // window size cvec_t * complex_vector = new_cvec (window_size); // input buffer uint_t rand_times = 4; @@ -46,8 +44,5 @@ int main (void) // destroy it del_cvec(complex_vector); - - aubio_cleanup(); - return 0; } diff --git a/tests/src/test-delnull.c b/tests/src/test-delnull.c index 8ec56c8f..bb245090 100644 --- a/tests/src/test-delnull.c +++ b/tests/src/test-delnull.c @@ -6,8 +6,6 @@ int main (void) { - aubio_init(); - uint_t return_code = 0; fvec_t *f = new_fvec(-12); cvec_t *c = new_cvec(-12); @@ -22,8 +20,5 @@ int main (void) } else if (fft != NULL) { return_code = 3; } - - aubio_cleanup(); - return return_code; } diff --git a/tests/src/test-fmat.c b/tests/src/test-fmat.c index bf0a9156..218c027e 100644 --- a/tests/src/test-fmat.c +++ b/tests/src/test-fmat.c @@ -6,8 +6,6 @@ int main (void) { - aubio_init(); - uint_t height = 3, length = 9, i, j; // create fmat_t object fmat_t * mat = new_fmat (height, length); @@ -27,9 +25,6 @@ int main (void) fmat_print(mat); // destroy it del_fmat(mat); - - aubio_cleanup(); - return 0; } diff --git a/tests/src/test-fvec.c b/tests/src/test-fvec.c index 313c902a..c53e3968 100644 --- a/tests/src/test-fvec.c +++ b/tests/src/test-fvec.c @@ -3,8 +3,6 @@ int main (void) { - aubio_init(); - uint_t vec_size = 10, i; fvec_t * vec = new_fvec (vec_size); @@ -40,8 +38,6 @@ int main (void) // now destroys the vector del_fvec(vec); - aubio_cleanup(); - return 0; } diff --git a/tests/src/test-lvec.c b/tests/src/test-lvec.c index 58ac4a48..17b5fc66 100644 --- a/tests/src/test-lvec.c +++ b/tests/src/test-lvec.c @@ -3,8 +3,6 @@ int main (void) { - aubio_init(); - uint_t win_s = 32; // window size lvec_t * sp = new_lvec (win_s); // input buffer lvec_set_sample (sp, 2./3., 0); @@ -15,9 +13,6 @@ int main (void) lvec_set_all (sp, 3./5.); lvec_print (sp); del_lvec(sp); - - aubio_cleanup(); - return 0; } diff --git a/tests/src/test-mathutils-window.c b/tests/src/test-mathutils-window.c index 02a44315..4b45e7f1 100644 --- a/tests/src/test-mathutils-window.c +++ b/tests/src/test-mathutils-window.c @@ -3,8 +3,6 @@ int main (void) { - aubio_init(); - uint_t length = 0; uint_t n_length = 4, n_types = 10, i, t; uint_t lengths[4] = { 8, 10, 15, 16 }; @@ -28,9 +26,6 @@ int main (void) del_fvec(window); } } - - aubio_cleanup(); - return 0; } diff --git a/tests/src/test-mathutils.c b/tests/src/test-mathutils.c index e240d61c..0a6eedff 100644 --- a/tests/src/test-mathutils.c +++ b/tests/src/test-mathutils.c @@ -113,13 +113,8 @@ int test_aubio_window (void) int main (void) { - aubio_init(); - test_next_power_of_two(); test_miditofreq(); test_freqtomidi(); - - aubio_cleanup(); - return 0; } diff --git a/tests/src/utils/test-hist.c b/tests/src/utils/test-hist.c index 3f84acbd..ee3bc9b6 100644 --- a/tests/src/utils/test-hist.c +++ b/tests/src/utils/test-hist.c @@ -4,8 +4,6 @@ int main (void) { - aubio_init(); - uint_t length; for (length = 1; length < 10; length ++ ) { aubio_hist_t *o = new_aubio_hist(0, 1, length); @@ -27,9 +25,6 @@ int main (void) del_aubio_hist(o); del_fvec(t); } - - aubio_cleanup(); - return 0; } diff --git a/tests/src/utils/test-log.c b/tests/src/utils/test-log.c index 26cde813..1c6b15b3 100644 --- a/tests/src/utils/test-log.c +++ b/tests/src/utils/test-log.c @@ -23,8 +23,6 @@ void logging(int level, const char_t *message, void *data) { int main (void) { - aubio_init(); - fprintf(stdout, "### testing normal logging\n"); AUBIO_ERR("testing normal AUBIO_LOG_ERR\n"); AUBIO_INF("testing normal AUBIO_LOG_INF\n"); @@ -58,7 +56,5 @@ int main (void) AUBIO_MSG("testing custom set_level_function AUBIO_LOG_MSG\n"); AUBIO_DBG("testing again normal AUBIO_LOG_DBG\n"); - aubio_cleanup(); - return 0; } diff --git a/tests/src/utils/test-parameter.c b/tests/src/utils/test-parameter.c index b275011d..073d9c3c 100644 --- a/tests/src/utils/test-parameter.c +++ b/tests/src/utils/test-parameter.c @@ -24,8 +24,6 @@ void get_some_steps ( aubio_parameter_t * param ) int main (void) { - aubio_init(); - smpl_t max_value = 100.; smpl_t min_value = 0.; uint_t steps = 10; @@ -68,7 +66,5 @@ int main (void) del_aubio_parameter (param); - aubio_cleanup(); - return 0; } diff --git a/tests/src/utils/test-scale.c b/tests/src/utils/test-scale.c index 1736d505..df1f0d8d 100644 --- a/tests/src/utils/test-scale.c +++ b/tests/src/utils/test-scale.c @@ -4,8 +4,6 @@ int main (void) { - aubio_init(); - uint_t n = 0; uint_t win_s = 1024; // window size fvec_t * in = new_fvec (win_s); // input buffer @@ -20,7 +18,5 @@ int main (void) del_aubio_scale(o); del_fvec(in); - aubio_cleanup(); - return 0; } -- 2.11.0