- Timestamp:
- Nov 24, 2018, 6:53:12 PM (6 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
- Children:
- 0f5f40b
- Parents:
- c4a8bc1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/onset/onset.c
rc4a8bc1 re4e0861 257 257 o->pp = new_aubio_peakpicker(); 258 258 o->od = new_aubio_specdesc(onset_mode,buf_size); 259 if (o->od == NULL) goto beach_specdesc;260 259 o->fftgrain = new_cvec(buf_size); 261 260 o->desc = new_fvec(1); 262 261 o->spectral_whitening = new_aubio_spectral_whitening(buf_size, hop_size, samplerate); 263 262 263 if (!o->pv || !o->pp || !o->od || !o->fftgrain 264 || !o->desc || !o->spectral_whitening) 265 goto beach; 266 264 267 /* initialize internal variables */ 265 268 aubio_onset_set_default_parameters (o, onset_mode); … … 268 271 return o; 269 272 270 beach_specdesc:271 del_aubio_peakpicker(o->pp);272 del_aubio_pvoc(o->pv);273 273 beach: 274 AUBIO_FREE(o);274 del_aubio_onset(o); 275 275 return NULL; 276 276 } … … 340 340 void del_aubio_onset (aubio_onset_t *o) 341 341 { 342 del_aubio_spectral_whitening(o->spectral_whitening); 343 del_aubio_specdesc(o->od); 344 del_aubio_peakpicker(o->pp); 345 del_aubio_pvoc(o->pv); 346 del_fvec(o->desc); 347 del_cvec(o->fftgrain); 342 if (o->spectral_whitening) 343 del_aubio_spectral_whitening(o->spectral_whitening); 344 if (o->od) 345 del_aubio_specdesc(o->od); 346 if (o->pp) 347 del_aubio_peakpicker(o->pp); 348 if (o->pv) 349 del_aubio_pvoc(o->pv); 350 if (o->desc) 351 del_fvec(o->desc); 352 if (o->fftgrain) 353 del_cvec(o->fftgrain); 348 354 AUBIO_FREE(o); 349 355 }
Note: See TracChangeset
for help on using the changeset viewer.