diff bits/PreservingPluginHandleMapper.h @ 52:e90fd30990eb

Error handling, and pass plugin handles through
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 16 Sep 2016 16:20:05 +0100
parents f4244a2d55ac
children 7aec704705c7
line wrap: on
line diff
--- a/bits/PreservingPluginHandleMapper.h	Fri Sep 16 15:10:57 2016 +0100
+++ b/bits/PreservingPluginHandleMapper.h	Fri Sep 16 16:20:05 2016 +0100
@@ -51,7 +51,7 @@
 public:
     PreservingPluginHandleMapper() : m_handle(0), m_plugin(0) { }
 
-    virtual int32_t pluginToHandle(Vamp::Plugin *p) const {
+    virtual Handle pluginToHandle(Vamp::Plugin *p) const {
 	if (p == m_plugin) return m_handle;
 	else {
 	    std::cerr << "PreservingPluginHandleMapper: p = " << p
@@ -62,7 +62,7 @@
 	}
     }
 
-    virtual Vamp::Plugin *handleToPlugin(int32_t h) const {
+    virtual Vamp::Plugin *handleToPlugin(Handle h) const {
 	m_handle = h;
 	m_plugin = reinterpret_cast<Vamp::Plugin *>(h);
 	return m_plugin;
@@ -72,12 +72,12 @@
         return m_omapper;
     }
         
-    virtual const PluginOutputIdMapper &handleToOutputIdMapper(int32_t h) const {
+    virtual const PluginOutputIdMapper &handleToOutputIdMapper(Handle h) const {
         return m_omapper;
     }
     
 private:
-    mutable int32_t m_handle;
+    mutable Handle m_handle;
     mutable Vamp::Plugin *m_plugin;
     PreservingPluginOutputIdMapper m_omapper;
 };