Mercurial > hg > piper-cpp
comparison vamp-client/PluginStub.h @ 118:ff3fd8d1b2dc
Boilerplate comments
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 27 Oct 2016 12:01:37 +0100 |
parents | cd438188e3f9 |
children | 4a37daf5f8b4 |
comparison
equal
deleted
inserted
replaced
117:5dffc5147176 | 118:ff3fd8d1b2dc |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 /* | |
3 Piper C++ | |
4 | |
5 An API for audio analysis and feature extraction plugins. | |
6 | |
7 Centre for Digital Music, Queen Mary, University of London. | |
8 Copyright 2006-2016 Chris Cannam and QMUL. | |
9 | |
10 Permission is hereby granted, free of charge, to any person | |
11 obtaining a copy of this software and associated documentation | |
12 files (the "Software"), to deal in the Software without | |
13 restriction, including without limitation the rights to use, copy, | |
14 modify, merge, publish, distribute, sublicense, and/or sell copies | |
15 of the Software, and to permit persons to whom the Software is | |
16 furnished to do so, subject to the following conditions: | |
17 | |
18 The above copyright notice and this permission notice shall be | |
19 included in all copies or substantial portions of the Software. | |
20 | |
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
22 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
24 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR | |
25 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF | |
26 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | |
27 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
28 | |
29 Except as contained in this notice, the names of the Centre for | |
30 Digital Music; Queen Mary, University of London; and Chris Cannam | |
31 shall not be used in advertising or otherwise to promote the sale, | |
32 use or other dealings in this Software without prior written | |
33 authorization. | |
34 */ | |
1 | 35 |
2 #ifndef PIPER_PLUGIN_STUB_H | 36 #ifndef PIPER_PLUGIN_STUB_H |
3 #define PIPER_PLUGIN_STUB_H | 37 #define PIPER_PLUGIN_STUB_H |
4 | 38 |
5 #include <vamp-hostsdk/Plugin.h> | 39 #include <vamp-hostsdk/Plugin.h> |
38 m_config(defaultConfig) | 72 m_config(defaultConfig) |
39 { } | 73 { } |
40 | 74 |
41 virtual ~PluginStub() { | 75 virtual ~PluginStub() { |
42 if (m_state != Finished) { | 76 if (m_state != Finished) { |
43 (void)m_client->finish(this); | 77 (void)m_client->finish(this); |
44 } | 78 } |
45 } | 79 } |
46 | 80 |
47 virtual std::string getIdentifier() const { | 81 virtual std::string getIdentifier() const { |
48 return m_psd.basic.identifier; | 82 return m_psd.basic.identifier; |
176 } | 210 } |
177 return staticOutputs; | 211 return staticOutputs; |
178 } | 212 } |
179 | 213 |
180 virtual FeatureSet process(const float *const *inputBuffers, | 214 virtual FeatureSet process(const float *const *inputBuffers, |
181 Vamp::RealTime timestamp) { | 215 Vamp::RealTime timestamp) { |
182 | 216 |
183 if (m_state == Loaded) { | 217 if (m_state == Loaded) { |
184 throw std::logic_error("Plugin has not been initialised"); | 218 throw std::logic_error("Plugin has not been initialised"); |
185 } | 219 } |
186 if (m_state == Finished) { | 220 if (m_state == Finished) { |