Don't show DSP stats of inserts that don't collect them.
authorRobin Gareus <robin@gareus.org>
Mon, 3 Dec 2018 21:34:14 +0000 (22:34 +0100)
committerRobin Gareus <robin@gareus.org>
Mon, 3 Dec 2018 21:43:13 +0000 (22:43 +0100)
gtk2_ardour/generic_pluginui.cc
gtk2_ardour/plugin_dspload_window.cc

index 7b5820cd27a13387847c97be515e73e413493209..b930c14b850e1470bd6dd5e6b14ca9390abcc8e1 100644 (file)
@@ -157,7 +157,9 @@ GenericPluginUI::GenericPluginUI (boost::shared_ptr<PluginInsert> pi, bool scrol
                pack_end (plugin_analysis_expander, false, false);
        }
 
                pack_end (plugin_analysis_expander, false, false);
        }
 
-       pack_end (cpuload_expander, false, false);
+       if (insert->provides_stats ()) {
+               pack_end (cpuload_expander, false, false);
+       }
 
        if (!plugin->get_docs().empty()) {
                pack_end (description_expander, false, false);
 
        if (!plugin->get_docs().empty()) {
                pack_end (description_expander, false, false);
index 2e20f9dcc8949436f760e7cea31e464ff2f5d156..5fcc765b2454a870b0ea9b04c683e527b5b8cef7 100644 (file)
@@ -154,7 +154,7 @@ PluginDSPLoadWindow::add_processor_to_display (boost::weak_ptr<Processor> w, std
 {
        boost::shared_ptr<Processor> p = w.lock ();
        boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (p);
 {
        boost::shared_ptr<Processor> p = w.lock ();
        boost::shared_ptr<PluginInsert> pi = boost::dynamic_pointer_cast<PluginInsert> (p);
-       if (!pi) {
+       if (!pi || !pi->provides_stats ()) {
                return;
        }
        p->DropReferences.connect (_processor_connections, MISSING_INVALIDATOR, boost::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context());
                return;
        }
        p->DropReferences.connect (_processor_connections, MISSING_INVALIDATOR, boost::bind (&PluginDSPLoadWindow::refill_processors, this), gui_context());