diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index 7f5583b1d4..f3ebf5bde0 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -59,7 +59,7 @@ class Plugin; class LIBARDOUR_API PluginInsert : public Processor { public: - PluginInsert (Session&, boost::shared_ptr = boost::shared_ptr()); + PluginInsert (Session&, Temporal::TimeDomain td, boost::shared_ptr = boost::shared_ptr()); ~PluginInsert (); void drop_references (); diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index ad6ba96a6e..5e5c4e5b97 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -78,7 +78,7 @@ Auditioner::init () if (!audition_synth_info) { lookup_fallback_synth (); - } + } _output->changed.connect_same_thread (*this, boost::bind (&Auditioner::output_changed, this, _1, _2)); @@ -107,7 +107,7 @@ Auditioner::lookup_fallback_synth_plugin_info (std::string const& uri) const void Auditioner::lookup_fallback_synth () { - + PluginInfoPtr nfo = lookup_fallback_synth_plugin_info ("http://gareus.org/oss/lv2/gmsynth"); //GMsynth not found: fallback to Reasonable Synth @@ -138,10 +138,10 @@ Auditioner::load_synth (bool need_lock) if (!audition_synth_info) { return; } - + boost::shared_ptr p = audition_synth_info->load (_session); if (p) { - asynth = boost::shared_ptr (new PluginInsert (_session, p)); + asynth = boost::shared_ptr (new PluginInsert (_session, time_domain(), p)); } } @@ -608,4 +608,3 @@ Auditioner::monitoring_state () const { return MonitoringDisk; } - diff --git a/libs/ardour/lua_api.cc b/libs/ardour/lua_api.cc index 4b0fb8697c..2eaed393dd 100644 --- a/libs/ardour/lua_api.cc +++ b/libs/ardour/lua_api.cc @@ -108,7 +108,8 @@ ARDOUR::LuaAPI::new_luaproc (Session *s, const string& name) return boost::shared_ptr (); } - return boost::shared_ptr (new PluginInsert (*s, p)); +#warning NUTEMPO caller should be able to control time domain + return boost::shared_ptr (new PluginInsert (*s, Config->get_default_automation_time_domain(), p)); } boost::shared_ptr @@ -231,7 +232,8 @@ ARDOUR::LuaAPI::new_plugin (Session *s, const string& name, ARDOUR::PluginType t } } - return boost::shared_ptr (new PluginInsert (*s, p)); +#warning NUTEMPO caller should be able to control time domain + return boost::shared_ptr (new PluginInsert (*s, Config->get_default_automation_time_domain(), p)); } bool diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index f8095fc81e..11738c9c90 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -75,9 +75,8 @@ using namespace PBD; const string PluginInsert::port_automation_node_name = "PortAutomation"; -PluginInsert::PluginInsert (Session& s, boost::shared_ptr plug) -#warning NUTEMPO why audio time when this processor can handle MIDI also - : Processor (s, (plug ? plug->name() : string ("toBeRenamed")), Temporal::AudioTime) +PluginInsert::PluginInsert (Session& s, Temporal::TimeDomain td, boost::shared_ptr plug) + : Processor (s, (plug ? plug->name() : string ("toBeRenamed")), td) , _sc_playback_latency (0) , _sc_capture_latency (0) , _plugin_signal_latency (0) diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index da23eb1dcb..04cd5ced39 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -945,7 +945,7 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version) if (_session.get_disable_all_loaded_plugins ()) { processor.reset (new UnknownProcessor (_session, node)); } else { - processor.reset (new PluginInsert (_session)); + processor.reset (new PluginInsert (_session, time_domain())); processor->set_owner (this); } @@ -3215,7 +3215,7 @@ Route::set_processor_state (XMLNode const& node, int version, XMLProperty const* if (_session.get_disable_all_loaded_plugins ()) { processor.reset (new UnknownProcessor (_session, node)); } else { - processor.reset (new PluginInsert (_session)); + processor.reset (new PluginInsert (_session, time_domain())); processor->set_owner (this); } } else if (prop->value() == "port") { diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 386cf93b51..8cafa213dc 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3432,7 +3432,7 @@ Session::load_and_connect_instruments (RouteList& new_routes, bool strict_io, bo if (pset) { plugin->load_preset (*pset); } - boost::shared_ptr pi (new PluginInsert (*this, plugin)); + boost::shared_ptr pi (new PluginInsert (*this, (*r)->time_domain(), plugin)); if (strict_io) { pi->set_strict_io (true); } diff --git a/libs/ardour/test/lua_script_test.cc b/libs/ardour/test/lua_script_test.cc index 9f715aa5e3..ec29415517 100644 --- a/libs/ardour/test/lua_script_test.cc +++ b/libs/ardour/test/lua_script_test.cc @@ -91,7 +91,7 @@ LuaScriptTest::dsp_script_test () PluginPtr p = (*i)->load (*_session); CPPUNIT_ASSERT_MESSAGE ((*i)->name, p); - boost::shared_ptr processor (new PluginInsert (*_session, p)); + boost::shared_ptr processor (new PluginInsert (*_session, r->time_domain(), p)); processor->enable (true); int rv = r->add_processor (processor, boost::shared_ptr(), 0);