Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/hostext/PluginWrapper.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 |
---|---|
38 | 38 |
39 namespace Vamp { | 39 namespace Vamp { |
40 | 40 |
41 namespace HostExt { | 41 namespace HostExt { |
42 | 42 |
43 class PluginRateExtractor : public Plugin | |
44 { | |
45 public: | |
46 float getRate() const { return m_inputSampleRate; } | |
47 }; | |
48 | |
43 PluginWrapper::PluginWrapper(Plugin *plugin) : | 49 PluginWrapper::PluginWrapper(Plugin *plugin) : |
44 Plugin(0), | 50 Plugin(((PluginRateExtractor *)plugin)->getRate()), |
45 m_plugin(plugin) | 51 m_plugin(plugin) |
46 { | 52 { |
47 } | 53 } |
48 | 54 |
49 PluginWrapper::~PluginWrapper() | 55 PluginWrapper::~PluginWrapper() |
50 { | 56 { |
51 delete m_plugin; | 57 delete m_plugin; |
52 } | 58 } |
53 | 59 |
54 bool | 60 bool |
55 PluginWrapper::initialise(size_t channels, size_t stepSize, size_t blockSize) | 61 PluginWrapper::initialise(size_t channels, size_t stepSize, size_t blockSize) |
56 { | 62 { |
57 return m_plugin->initialise(channels, stepSize, blockSize); | 63 return m_plugin->initialise(channels, stepSize, blockSize); |
58 } | 64 } |