diff widgets/PluginParameterBox.cpp @ 1592:1da52d5e6700

Merge from branch audio-source-refactor. Mostly handling changes to plugin ownership
author Chris Cannam
date Fri, 03 Apr 2020 12:12:47 +0100
parents 11660e0c896f
children 19da7fa80c3c
line wrap: on
line diff
--- a/widgets/PluginParameterBox.cpp	Fri Apr 03 11:35:40 2020 +0100
+++ b/widgets/PluginParameterBox.cpp	Fri Apr 03 12:12:47 2020 +0100
@@ -34,7 +34,8 @@
 
 #include <cmath>
 
-PluginParameterBox::PluginParameterBox(Vamp::PluginBase *plugin, QWidget *parent) :
+PluginParameterBox::PluginParameterBox(std::shared_ptr<Vamp::PluginBase> plugin,
+                                       QWidget *parent) :
     QFrame(parent),
     m_plugin(plugin),
     m_programCombo(nullptr)
@@ -100,7 +101,7 @@
         float value = m_plugin->getParameter(params[i].identifier);
 
         int hint = PortHint::NoHint;
-        RealTimePluginInstance *rtpi = dynamic_cast<RealTimePluginInstance *>
+        auto rtpi = std::dynamic_pointer_cast<RealTimePluginInstance>
             (m_plugin);
         if (rtpi) {
             hint = rtpi->getParameterDisplayHint(i);