cannam@17: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
cannam@17:
cannam@17: /*
cannam@17: Vamp feature extraction plugins using Paul Brossier's Aubio library.
cannam@17:
cannam@17: Centre for Digital Music, Queen Mary, University of London.
cannam@17: This file copyright 2006 Chris Cannam.
cannam@17:
piem@112: This file is part of vamp-aubio-plugins.
piem@112:
piem@112: vamp-aubio is free software: you can redistribute it and/or modify
piem@112: it under the terms of the GNU General Public License as published by
piem@112: the Free Software Foundation, either version 3 of the License, or
piem@112: (at your option) any later version.
piem@112:
piem@112: vamp-aubio is distributed in the hope that it will be useful,
piem@112: but WITHOUT ANY WARRANTY; without even the implied warranty of
piem@112: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
piem@112: GNU General Public License for more details.
piem@112:
piem@112: You should have received a copy of the GNU General Public License
piem@112: along with aubio. If not, see .
cannam@17:
cannam@17: */
cannam@17:
cannam@17: #ifndef _SILENCE_PLUGIN_H_
cannam@17: #define _SILENCE_PLUGIN_H_
cannam@17:
cannam@17: #include
piem@51: #include
cannam@17:
cannam@17: class Silence : public Vamp::Plugin
cannam@17: {
cannam@17: public:
cannam@31: Silence(float inputSampleRate);
cannam@17: virtual ~Silence();
cannam@17:
cannam@17: bool initialise(size_t channels, size_t stepSize, size_t blockSize);
cannam@17: void reset();
cannam@17:
cannam@17: InputDomain getInputDomain() const { return TimeDomain; }
cannam@17:
cannam@17: std::string getIdentifier() const;
cannam@17: std::string getName() const;
cannam@17: std::string getDescription() const;
cannam@17: std::string getMaker() const;
cannam@17: int getPluginVersion() const;
cannam@17: std::string getCopyright() const;
cannam@17:
cannam@17: ParameterList getParameterDescriptors() const;
cannam@17: float getParameter(std::string) const;
cannam@17: void setParameter(std::string, float);
cannam@17:
cannam@17: size_t getPreferredStepSize() const;
cannam@17: size_t getPreferredBlockSize() const;
cannam@17:
cannam@17: OutputList getOutputDescriptors() const;
cannam@17:
cannam@17: FeatureSet process(const float *const *inputBuffers,
cannam@17: Vamp::RealTime timestamp);
cannam@17:
cannam@17: FeatureSet getRemainingFeatures();
cannam@17:
cannam@17: protected:
cannam@17: fvec_t *m_ibuf;
cannam@17: fvec_t *m_pbuf;
cannam@17: float m_threshold;
cannam@17: size_t m_stepSize;
cannam@17: size_t m_blockSize;
cannam@17: bool m_prevSilent;
cannam@17: bool m_first;
cannam@20: Vamp::RealTime m_lastChange;
cannam@20: Vamp::RealTime m_lastTimestamp;
cannam@17: };
cannam@17:
cannam@17:
cannam@17: #endif