diff 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
line wrap: on
line diff
--- a/vamp-sdk/hostext/PluginWrapper.cpp	Fri May 25 13:26:59 2007 +0000
+++ b/vamp-sdk/hostext/PluginWrapper.cpp	Fri Jun 01 13:53:42 2007 +0000
@@ -40,8 +40,14 @@
 
 namespace HostExt {
 
+class PluginRateExtractor : public Plugin
+{
+public:
+    float getRate() const { return m_inputSampleRate; }
+};
+
 PluginWrapper::PluginWrapper(Plugin *plugin) :
-    Plugin(0),
+    Plugin(((PluginRateExtractor *)plugin)->getRate()),
     m_plugin(plugin)
 {
 }
@@ -50,7 +56,7 @@
 {
     delete m_plugin;
 }
-    
+
 bool
 PluginWrapper::initialise(size_t channels, size_t stepSize, size_t blockSize)
 {