annotate plugins/Silence.h @ 198:3a76aa26b578 tip master

wscript: check for 64bit using sys.maxsize (closes #3)
author Paul Brossier <piem@piem.org>
date Mon, 04 Dec 2017 01:42:19 +0100
parents f80b207ccd15
children
rev   line source
cannam@17 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
cannam@17 2
cannam@17 3 /*
cannam@17 4 Vamp feature extraction plugins using Paul Brossier's Aubio library.
cannam@17 5
cannam@17 6 Centre for Digital Music, Queen Mary, University of London.
cannam@17 7 This file copyright 2006 Chris Cannam.
cannam@17 8
piem@112 9 This file is part of vamp-aubio-plugins.
piem@112 10
piem@112 11 vamp-aubio is free software: you can redistribute it and/or modify
piem@112 12 it under the terms of the GNU General Public License as published by
piem@112 13 the Free Software Foundation, either version 3 of the License, or
piem@112 14 (at your option) any later version.
piem@112 15
piem@112 16 vamp-aubio is distributed in the hope that it will be useful,
piem@112 17 but WITHOUT ANY WARRANTY; without even the implied warranty of
piem@112 18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
piem@112 19 GNU General Public License for more details.
piem@112 20
piem@112 21 You should have received a copy of the GNU General Public License
piem@112 22 along with aubio. If not, see <http://www.gnu.org/licenses/>.
cannam@17 23
cannam@17 24 */
cannam@17 25
cannam@17 26 #ifndef _SILENCE_PLUGIN_H_
cannam@17 27 #define _SILENCE_PLUGIN_H_
cannam@17 28
cannam@17 29 #include <vamp-sdk/Plugin.h>
piem@51 30 #include <aubio/aubio.h>
cannam@17 31
cannam@17 32 class Silence : public Vamp::Plugin
cannam@17 33 {
cannam@17 34 public:
cannam@31 35 Silence(float inputSampleRate);
cannam@17 36 virtual ~Silence();
cannam@17 37
cannam@17 38 bool initialise(size_t channels, size_t stepSize, size_t blockSize);
cannam@17 39 void reset();
cannam@17 40
cannam@17 41 InputDomain getInputDomain() const { return TimeDomain; }
cannam@17 42
cannam@17 43 std::string getIdentifier() const;
cannam@17 44 std::string getName() const;
cannam@17 45 std::string getDescription() const;
cannam@17 46 std::string getMaker() const;
cannam@17 47 int getPluginVersion() const;
cannam@17 48 std::string getCopyright() const;
cannam@17 49
cannam@17 50 ParameterList getParameterDescriptors() const;
cannam@17 51 float getParameter(std::string) const;
cannam@17 52 void setParameter(std::string, float);
cannam@17 53
cannam@17 54 size_t getPreferredStepSize() const;
cannam@17 55 size_t getPreferredBlockSize() const;
cannam@17 56
cannam@17 57 OutputList getOutputDescriptors() const;
cannam@17 58
cannam@17 59 FeatureSet process(const float *const *inputBuffers,
cannam@17 60 Vamp::RealTime timestamp);
cannam@17 61
cannam@17 62 FeatureSet getRemainingFeatures();
cannam@17 63
cannam@17 64 protected:
cannam@17 65 fvec_t *m_ibuf;
cannam@17 66 fvec_t *m_pbuf;
cannam@17 67 float m_threshold;
cannam@17 68 size_t m_stepSize;
cannam@17 69 size_t m_blockSize;
cannam@17 70 bool m_prevSilent;
cannam@17 71 bool m_first;
cannam@20 72 Vamp::RealTime m_lastChange;
cannam@20 73 Vamp::RealTime m_lastTimestamp;
cannam@17 74 };
cannam@17 75
cannam@17 76
cannam@17 77 #endif