diff options
author | Robin Gareus <robin@gareus.org> | 2014-01-12 18:11:14 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-01-12 18:11:14 +0100 |
commit | 1eaa30b7257f006878c9b2c88ecbaea5bc36b174 (patch) | |
tree | a64a74c967021611c127870acc40c8098b79ecca /libs/vamp-plugins/Onset.h | |
parent | 58f82b52e584c48c90cc98c575d085aef165ebc0 (diff) |
aubio 3+4 compat
Diffstat (limited to 'libs/vamp-plugins/Onset.h')
-rw-r--r-- | libs/vamp-plugins/Onset.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/libs/vamp-plugins/Onset.h b/libs/vamp-plugins/Onset.h index 314e107308..bba95e0d2b 100644 --- a/libs/vamp-plugins/Onset.h +++ b/libs/vamp-plugins/Onset.h @@ -20,6 +20,19 @@ #include <vamp-sdk/Plugin.h> #include <aubio/aubio.h> +#ifdef HAVE_AUBIO4 +enum OnsetType { + OnsetEnergy, + OnsetSpecDiff, + OnsetHFC, + OnsetComplex, + OnsetPhase, + OnsetKL, + OnsetMKL, + OnsetSpecFlux // new in 0.4! +}; +#endif + class Onset : public Vamp::Plugin { public: @@ -54,20 +67,25 @@ public: protected: fvec_t *m_ibuf; - cvec_t *m_fftgrain; fvec_t *m_onset; +#ifdef HAVE_AUBIO4 + aubio_onset_t *m_onsetdet; + OnsetType m_onsettype; + float m_minioi; +#else + cvec_t *m_fftgrain; aubio_pvoc_t *m_pv; aubio_pickpeak_t *m_peakpick; aubio_onsetdetection_t *m_onsetdet; aubio_onsetdetection_type m_onsettype; - float m_threshold; + size_t m_channelCount; +#endif float m_silence; + float m_threshold; size_t m_stepSize; size_t m_blockSize; - size_t m_channelCount; Vamp::RealTime m_delay; Vamp::RealTime m_lastOnset; }; - #endif |