Changeset c621415


Ignore:
Timestamp:
Jul 13, 2006, 5:57:21 PM (15 years ago)
Author:
Paul Brossier <piem@altern.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
e43c018
Parents:
714380d
Message:

fix memory freeing in onsetdetection, remove useless _alloc
fix memory freeing in onsetdetection, remove useless _alloc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/onsetdetection.c

    r714380d rc621415  
    4040};
    4141
    42 
    43 static aubio_onsetdetection_t * aubio_onsetdetection_alloc(aubio_onsetdetection_type type, uint_t size, uint_t channels);
    4442
    4543/* Energy based onset detection function */
     
    193191}
    194192
    195 /* Allocate memory for an onset detection */
     193/* Allocate memory for an onset detection
     194 * depending on the choosen type, allocate memory as needed
     195 */
    196196aubio_onsetdetection_t *
    197197new_aubio_onsetdetection (aubio_onsetdetection_type type,
    198                 uint_t size, uint_t channels){
    199         return aubio_onsetdetection_alloc(type,size,channels);
    200 }
    201 
    202 /* depending on the choosen type, allocate memory as needed */
    203 aubio_onsetdetection_t *
    204 aubio_onsetdetection_alloc (aubio_onsetdetection_type type,
    205198                uint_t size, uint_t channels){
    206199        aubio_onsetdetection_t * o = AUBIO_NEW(aubio_onsetdetection_t);
     
    308301                        del_aubio_hist(o->histog);
    309302                        break;
     303                case aubio_onset_kl:
     304                        del_fvec(o->oldmag);
     305                        break;
     306                case aubio_onset_mkl:
     307                        del_fvec(o->oldmag);
     308                        break;
    310309                default:
    311310                        break;
Note: See TracChangeset for help on using the changeset viewer.