diff src/vamp-hostsdk/PluginWrapper.cpp @ 500:4a86f866bb6b

The PluginRateExtractor hack was exploiting undefined behaviour. Let's just give in and make that API official
author Chris Cannam
date Mon, 11 Dec 2017 13:22:11 +0000
parents c97e70ed5abc
children 8ffb8985ae8f
line wrap: on
line diff
--- a/src/vamp-hostsdk/PluginWrapper.cpp	Mon Dec 11 09:27:57 2017 +0000
+++ b/src/vamp-hostsdk/PluginWrapper.cpp	Mon Dec 11 13:22:11 2017 +0000
@@ -42,15 +42,8 @@
 
 namespace HostExt {
 
-class PluginRateExtractor : public Plugin
-{
-public:
-    PluginRateExtractor() : Plugin(0) { }
-    float getRate() const { return m_inputSampleRate; }
-};
-
 PluginWrapper::PluginWrapper(Plugin *plugin) :
-    Plugin(((PluginRateExtractor *)plugin)->getRate()),
+    Plugin(plugin->getInputSampleRate()),
     m_plugin(plugin)
 {
 }