Mercurial > hg > vamp-plugin-sdk
comparison host/vamp-simple-host.cpp @ 61:97c5ac99d725 host-factory-stuff
* install hostext headers to vamp-sdk/hostext/ rather than vamp-sdk/
* adjust timestamps in input-domain adapter so as to centre them on block
as required by Plugin documentation
* better handling for frequency-domain plugins that want non-power-of-two
blocksizes (can't handle them, but at least try offering them a power-of-two
alternative)
* couple of Plugin doc additions
* make PluginLoader capable of returning ready-wrapped plugins
author | cannam |
---|---|
date | Fri, 01 Jun 2007 13:53:42 +0000 |
parents | fa79c4ec847d |
children |
comparison
equal
deleted
inserted
replaced
60:087c16cca0d6 | 61:97c5ac99d725 |
---|---|
179 cerr << myname << ": ERROR: Failed to open input file \"" | 179 cerr << myname << ": ERROR: Failed to open input file \"" |
180 << wavname << "\": " << sf_strerror(sndfile) << endl; | 180 << wavname << "\": " << sf_strerror(sndfile) << endl; |
181 return 1; | 181 return 1; |
182 } | 182 } |
183 | 183 |
184 Vamp::Plugin *basePlugin = loader->loadPlugin(key, sfinfo.samplerate); | 184 Vamp::Plugin *plugin = loader->loadPlugin |
185 if (!basePlugin) { | 185 (key, sfinfo.samplerate, PluginLoader::ADAPT_ALL); |
186 if (!plugin) { | |
186 cerr << myname << ": ERROR: Failed to load plugin \"" << id | 187 cerr << myname << ": ERROR: Failed to load plugin \"" << id |
187 << "\" from library \"" << soname << "\"" << endl; | 188 << "\" from library \"" << soname << "\"" << endl; |
188 sf_close(sndfile); | 189 sf_close(sndfile); |
189 return 1; | 190 return 1; |
190 } | 191 } |
191 | |
192 Vamp::Plugin *plugin = | |
193 new Vamp::HostExt::PluginChannelAdapter | |
194 (new Vamp::HostExt::PluginInputDomainAdapter(basePlugin)); | |
195 | 192 |
196 cerr << "Running plugin: \"" << plugin->getIdentifier() << "\"..." << endl; | 193 cerr << "Running plugin: \"" << plugin->getIdentifier() << "\"..." << endl; |
197 | 194 |
198 int blockSize = plugin->getPreferredBlockSize(); | 195 int blockSize = plugin->getPreferredBlockSize(); |
199 int stepSize = plugin->getPreferredStepSize(); | 196 int stepSize = plugin->getPreferredStepSize(); |