comparison vamp-sdk/hostext/PluginWrapper.cpp @ 58:0284955e31e5 host-factory-stuff

* reshuffle
author cannam
date Thu, 24 May 2007 10:05:00 +0000
parents vamp-hostsdk/PluginWrapper.cpp@09a1aac6c362
children fa79c4ec847d
comparison
equal deleted inserted replaced
57:09a1aac6c362 58:0284955e31e5
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 Vamp
5
6 An API for audio analysis and feature extraction plugins.
7
8 Centre for Digital Music, Queen Mary, University of London.
9 Copyright 2006 Chris Cannam.
10
11 Permission is hereby granted, free of charge, to any person
12 obtaining a copy of this software and associated documentation
13 files (the "Software"), to deal in the Software without
14 restriction, including without limitation the rights to use, copy,
15 modify, merge, publish, distribute, sublicense, and/or sell copies
16 of the Software, and to permit persons to whom the Software is
17 furnished to do so, subject to the following conditions:
18
19 The above copyright notice and this permission notice shall be
20 included in all copies or substantial portions of the Software.
21
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR
26 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
27 CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30 Except as contained in this notice, the names of the Centre for
31 Digital Music; Queen Mary, University of London; and Chris Cannam
32 shall not be used in advertising or otherwise to promote the sale,
33 use or other dealings in this Software without prior written
34 authorization.
35 */
36
37 #include "PluginWrapper.h"
38
39 namespace Vamp {
40
41 PluginWrapper::PluginWrapper(Plugin *plugin) :
42 Plugin(0)
43 {
44 }
45
46 PluginWrapper::~PluginWrapper()
47 {
48 delete m_plugin;
49 }
50
51 bool
52 PluginWrapper::initialise(size_t channels, size_t stepSize, size_t blockSize)
53 {
54 return m_plugin->initialise(channels, stepSize, blockSize);
55 }
56
57 void
58 PluginWrapper::reset()
59 {
60 m_plugin->reset();
61 }
62
63 Plugin::InputDomain
64 PluginWrapper::getInputDomain() const
65 {
66 return m_plugin->getInputDomain();
67 }
68
69 unsigned int
70 PluginWrapper::getVampApiVersion() const
71 {
72 return m_plugin->getVampApiVersion();
73 }
74
75 std::string
76 PluginWrapper::getIdentifier() const
77 {
78 return m_plugin->getIdentifier();
79 }
80
81 std::string
82 PluginWrapper::getName() const
83 {
84 return m_plugin->getName();
85 }
86
87 std::string
88 PluginWrapper::getDescription() const
89 {
90 return m_plugin->getDescription();
91 }
92
93 std::string
94 PluginWrapper::getMaker() const
95 {
96 return m_plugin->getMaker();
97 }
98
99 int
100 PluginWrapper::getPluginVersion() const
101 {
102 return m_plugin->getPluginVersion();
103 }
104
105 std::string
106 PluginWrapper::getCopyright() const
107 {
108 return m_plugin->getCopyright();
109 }
110
111 PluginBase::ParameterList
112 PluginWrapper::getParameterDescriptors() const
113 {
114 return m_plugin->getParameterDescriptors();
115 }
116
117 float
118 PluginWrapper::getParameter(std::string parameter) const
119 {
120 return m_plugin->getParameter(parameter);
121 }
122
123 void
124 PluginWrapper::setParameter(std::string parameter, float value)
125 {
126 m_plugin->setParameter(parameter, value);
127 }
128
129 PluginBase::ProgramList
130 PluginWrapper::getPrograms() const
131 {
132 return m_plugin->getPrograms();
133 }
134
135 std::string
136 PluginWrapper::getCurrentProgram() const
137 {
138 return m_plugin->getCurrentProgram();
139 }
140
141 void
142 PluginWrapper::selectProgram(std::string program)
143 {
144 m_plugin->selectProgram(program);
145 }
146
147 size_t
148 PluginWrapper::getPreferredStepSize() const
149 {
150 return m_plugin->getPreferredStepSize();
151 }
152
153 size_t
154 PluginWrapper::getPreferredBlockSize() const
155 {
156 return m_plugin->getPreferredBlockSize();
157 }
158
159 size_t
160 PluginWrapper::getMinChannelCount() const
161 {
162 return m_plugin->getMinChannelCount();
163 }
164
165 size_t PluginWrapper::getMaxChannelCount() const
166 {
167 return m_plugin->getMaxChannelCount();
168 }
169
170 Plugin::OutputList
171 PluginWrapper::getOutputDescriptors() const
172 {
173 return m_plugin->getOutputDescriptors();
174 }
175
176 Plugin::FeatureSet
177 PluginWrapper::process(const float *const *inputBuffers, RealTime timestamp)
178 {
179 return m_plugin->process(inputBuffers, timestamp);
180 }
181
182 Plugin::FeatureSet
183 PluginWrapper::getRemainingFeatures()
184 {
185 return m_plugin->getRemainingFeatures();
186 }
187
188 }
189