diff plugins/Silence.h @ 20:8c939fff7ee1

* First bit of Vamp v2 work -- add an optional duration to features in a backward compatible way. Warning: this code is unstable and experimental and may change significantly in the coming weeks.
author Chris Cannam <cannam@all-day-breakfast.com>
date Thu, 17 Jul 2008 08:51:13 +0000
parents b85fbc77677b
children 2e979622bd93
line wrap: on
line diff
--- a/plugins/Silence.h	Fri Oct 19 13:55:23 2007 +0000
+++ b/plugins/Silence.h	Thu Jul 17 08:51:13 2008 +0000
@@ -23,7 +23,7 @@
 class Silence : public Vamp::Plugin
 {
 public:
-    Silence(float inputSampleRate);
+    Silence(float inputSampleRate, unsigned int apiVersion);
     virtual ~Silence();
 
     bool initialise(size_t channels, size_t stepSize, size_t blockSize);
@@ -53,6 +53,7 @@
     FeatureSet getRemainingFeatures();
 
 protected:
+    unsigned int m_apiVersion;
     fvec_t *m_ibuf;
     fvec_t *m_pbuf;
     smpl_t **m_tmpptrs;
@@ -62,6 +63,8 @@
     size_t m_channelCount;
     bool m_prevSilent;
     bool m_first;
+    Vamp::RealTime m_lastChange;
+    Vamp::RealTime m_lastTimestamp;
 };