Logo Search packages:      
Sourcecode: aubio version File versions  Download package

void del_aubio_onsetdetection ( aubio_onsetdetection_t o  ) 

deletion of an onset detection object

Parameters:
o onset detection object as returned by new_aubio_onsetdetection()

Definition at line 290 of file onsetdetection.c.

References aubio_onset_complex, aubio_onset_energy, aubio_onset_hfc, aubio_onset_kl, aubio_onset_mkl, aubio_onset_phase, aubio_onset_specdiff, _aubio_onsetdetection_t::dev1, _aubio_onsetdetection_t::histog, _aubio_onsetdetection_t::meas, _aubio_onsetdetection_t::oldmag, _aubio_onsetdetection_t::theta1, _aubio_onsetdetection_t::theta2, and _aubio_onsetdetection_t::type.

                                                         {

      switch(o->type) {
            /* for both energy and hfc, only fftgrain->norm is required */
            case aubio_onset_energy: 
                  break;
            case aubio_onset_hfc:
                  break;
            /* the other approaches will need some more memory spaces */
            case aubio_onset_complex:
                      AUBIO_FREE(o->meas);
                        del_fvec(o->oldmag);
                      del_fvec(o->dev1);
                      del_fvec(o->theta1);
                  del_fvec(o->theta2);
                  break;
            case aubio_onset_phase:
                      del_fvec(o->dev1);
                      del_fvec(o->theta1);
                  del_fvec(o->theta2);
                        del_aubio_hist(o->histog);
                  break;
            case aubio_onset_specdiff:
                        del_fvec(o->oldmag);
                      del_fvec(o->dev1);
                        del_aubio_hist(o->histog);
                  break;
            case aubio_onset_kl:
                      del_fvec(o->oldmag);
                  break;
            case aubio_onset_mkl:
                      del_fvec(o->oldmag);
                  break;
            default:
                  break;
      }
        AUBIO_FREE(o);
      
}


Generated by  Doxygen 1.6.0   Back to index