ref: 2cf905ffab87a4fc1b85b1d6b301a5142a471531
parent: f9204acd32615acdbd098218b09f0e30c4c7d35b
author: Paul Brossier <piem@piem.org>
date: Thu Nov 29 13:49:32 EST 2018
[tests] onset creation may succeed with non-power of two sizes
--- a/tests/src/onset/test-onset.c
+++ b/tests/src/onset/test-onset.c
@@ -84,11 +84,13 @@
// specdesc creation failed
if (new_aubio_onset("abcd", win_size, win_size/2, samplerate))
return 1;
- // pv creation failed
- if (new_aubio_onset("default", 5, 2, samplerate))
- return 1;
aubio_onset_t *o;
+
+ // pv creation might fail
+ o = new_aubio_onset("default", 5, 2, samplerate);
+ if (o) del_aubio_onset(o);
+
o = new_aubio_onset("default", win_size, hop_size, samplerate);
if (!aubio_onset_set_default_parameters(o, "wrong_type"))
return 1;