diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index 3a4b9c8344..6308b8aae8 100644 --- a/libs/ardour/ardour/buffer_set.h +++ b/libs/ardour/ardour/buffer_set.h @@ -41,9 +41,7 @@ struct _VstMidiEvent; typedef struct _VstMidiEvent VstMidiEvent; #endif -#ifdef LV2_SUPPORT typedef struct LV2_Evbuf_Impl LV2_Evbuf; -#endif namespace ARDOUR { @@ -114,7 +112,6 @@ public: Buffer& get_available(DataType type, size_t i); const Buffer& get_available(DataType type, size_t i) const; -#ifdef LV2_SUPPORT /** Get a MIDI buffer translated into an LV2 MIDI buffer for use with * plugins. The index here corresponds directly to MIDI buffer numbers * (i.e. the index passed to get_midi), translation back and forth will @@ -131,7 +128,6 @@ public: /** Forward plugin MIDI output to to Ardour buffers */ void forward_lv2_midi(LV2_Evbuf*, size_t, bool purge_ardour_buffer = true); -#endif #if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT VstEvents* get_vst_midi (size_t); @@ -188,11 +184,9 @@ private: /// Vector of vectors, indexed by DataType std::vector _buffers; -#ifdef LV2_SUPPORT /// LV2 MIDI buffers (for conversion to/from MIDI buffers) typedef std::vector< std::pair > LV2Buffers; LV2Buffers _lv2_buffers; -#endif #if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT class VSTBuffer { diff --git a/libs/ardour/auditioner.cc b/libs/ardour/auditioner.cc index 6ae58c04be..e50fe08297 100644 --- a/libs/ardour/auditioner.cc +++ b/libs/ardour/auditioner.cc @@ -96,9 +96,7 @@ Auditioner::lookup_fallback_synth_plugin_info (std::string const& uri) const { PluginManager& mgr (PluginManager::instance()); PluginInfoList plugs; -#ifdef LV2_SUPPORT plugs = mgr.lv2_plugin_info(); -#endif for (PluginInfoList::const_iterator i = plugs.begin (); i != plugs.end (); ++i) { if (uri == (*i)->unique_id){ return (*i); diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index d316768be1..263b35f35d 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -41,9 +41,7 @@ #include "ardour/plugin_insert.h" #include "ardour/record_enable_control.h" #include "ardour/session.h" -#ifdef LV2_SUPPORT #include "ardour/uri_map.h" -#endif #include "ardour/value_as_string.h" #include "pbd/i18n.h" @@ -216,10 +214,8 @@ Automatable::describe_parameter (Evoral::Parameter param) return string_compose("Pressure [%1]", int(param.channel()) + 1); } else if (param.type() == MidiNotePressureAutomation) { return string_compose("PolyPressure [%1]", int(param.channel()) + 1); -#ifdef LV2_SUPPORT } else if (param.type() == PluginPropertyAutomation) { return string_compose("Property %1", URIMap::instance().id_to_uri(param.id())); -#endif } else { return EventTypeMap::instance().to_symbol(param); } diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc index 9ad69216d3..c24ba459b3 100644 --- a/libs/ardour/buffer_set.cc +++ b/libs/ardour/buffer_set.cc @@ -37,11 +37,9 @@ #include "ardour/midi_buffer.h" #include "ardour/port.h" #include "ardour/port_set.h" -#ifdef LV2_SUPPORT #include "ardour/lv2_plugin.h" #include "lv2_evbuf.h" #include "ardour/uri_map.h" -#endif #if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT #include "ardour/vestige/vestige.h" #endif @@ -90,12 +88,10 @@ BufferSet::clear() _vst_buffers.clear (); #endif -#ifdef LV2_SUPPORT for (LV2Buffers::iterator i = _lv2_buffers.begin(); i != _lv2_buffers.end(); ++i) { free ((*i).second); } _lv2_buffers.clear (); -#endif } @@ -195,7 +191,6 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac _count.set (type, num_buffers); } -#ifdef LV2_SUPPORT // Ensure enough low level MIDI format buffers are available for conversion // in both directions (input & output, out-of-place) if (type == DataType::MIDI && _lv2_buffers.size() < _buffers[type].size() * 2 + 1) { @@ -207,7 +202,6 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac URIMap::instance().urids.atom_Sequence))); } } -#endif #if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT // As above but for VST @@ -261,8 +255,6 @@ BufferSet::get_available(DataType type, size_t i) const return *_buffers[type][i]; } -#ifdef LV2_SUPPORT - void BufferSet::ensure_lv2_bufsize(bool input, size_t i, size_t buffer_capacity) { @@ -344,8 +336,6 @@ BufferSet::flush_lv2_midi(bool input, size_t i) } } -#endif /* LV2_SUPPORT */ - #if defined WINDOWS_VST_SUPPORT || defined LXVST_SUPPORT || defined MACVST_SUPPORT VstEvents* diff --git a/libs/ardour/event_type_map.cc b/libs/ardour/event_type_map.cc index 45e2ddf977..57b9205348 100644 --- a/libs/ardour/event_type_map.cc +++ b/libs/ardour/event_type_map.cc @@ -26,9 +26,7 @@ #include "ardour/event_type_map.h" #include "ardour/parameter_descriptor.h" #include "ardour/parameter_types.h" -#ifdef LV2_SUPPORT #include "ardour/uri_map.h" -#endif #include "evoral/Parameter.h" #include "evoral/ParameterDescriptor.h" #include "evoral/midi_events.h" @@ -45,11 +43,7 @@ EventTypeMap& EventTypeMap::instance() { if (!EventTypeMap::event_type_map) { -#ifdef LV2_SUPPORT EventTypeMap::event_type_map = new EventTypeMap(&URIMap::instance()); -#else - EventTypeMap::event_type_map = new EventTypeMap(NULL); -#endif } return *EventTypeMap::event_type_map; } @@ -178,7 +172,6 @@ EventTypeMap::from_symbol(const string& str) const } else if (str.length() > 10 && str.substr(0, 10) == "parameter-") { p_type = PluginAutomation; p_id = atoi(str.c_str()+10); -#ifdef LV2_SUPPORT } else if (str.length() > 9 && str.substr(0, 9) == "property-") { p_type = PluginPropertyAutomation; const char* name = str.c_str() + 9; @@ -187,7 +180,6 @@ EventTypeMap::from_symbol(const string& str) const } else { p_id = _uri_map->uri_to_id(name); } -#endif } else if (str.length() > 7 && str.substr(0, 7) == "midicc-") { p_type = MidiCCAutomation; uint32_t channel = 0; @@ -279,7 +271,6 @@ EventTypeMap::to_symbol(const Evoral::Parameter& param) const return "rec-safe"; } else if (t == PluginAutomation) { return std::string("parameter-") + PBD::to_string(param.id()); -#ifdef LV2_SUPPORT } else if (t == PluginPropertyAutomation) { const char* uri = _uri_map->id_to_uri(param.id()); if (uri) { @@ -287,7 +278,6 @@ EventTypeMap::to_symbol(const Evoral::Parameter& param) const } else { return std::string("property-") + PBD::to_string(param.id()); } -#endif } else if (t == MidiCCAutomation) { return std::string("midicc-") + PBD::to_string (param.channel()) + "-" + PBD::to_string (param.id()); } else if (t == MidiPgmChangeAutomation) { diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 8a7391f5f9..177ae6d325 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -128,9 +128,7 @@ #include "ardour/source_factory.h" #include "ardour/transport_fsm.h" #include "ardour/transport_master_manager.h" -#ifdef LV2_SUPPORT #include "ardour/uri_map.h" -#endif #include "audiographer/routines.h" @@ -554,9 +552,7 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir /* singletons - first object is "it" */ (void)PluginManager::instance (); -#ifdef LV2_SUPPORT (void)URIMap::instance (); -#endif (void)EventTypeMap::instance (); ControlProtocolManager::instance ().discover_control_protocols (); diff --git a/libs/ardour/lua_api.cc b/libs/ardour/lua_api.cc index b446c56355..d7a0c60370 100644 --- a/libs/ardour/lua_api.cc +++ b/libs/ardour/lua_api.cc @@ -128,9 +128,7 @@ ARDOUR::LuaAPI::list_plugins () #ifdef AUDIOUNIT_SUPPORT all_plugs.insert (all_plugs.end (), manager.au_plugin_info ().begin (), manager.au_plugin_info ().end ()); #endif -#ifdef LV2_SUPPORT all_plugs.insert (all_plugs.end (), manager.lv2_plugin_info ().begin (), manager.lv2_plugin_info ().end ()); -#endif all_plugs.insert (all_plugs.end (), manager.lua_plugin_info ().begin (), manager.lua_plugin_info ().end ()); return all_plugs; @@ -155,9 +153,7 @@ ARDOUR::LuaAPI::new_plugin_info (const string& name, ARDOUR::PluginType type) #ifdef AUDIOUNIT_SUPPORT all_plugs.insert (all_plugs.end (), manager.au_plugin_info ().begin (), manager.au_plugin_info ().end ()); #endif -#ifdef LV2_SUPPORT all_plugs.insert (all_plugs.end (), manager.lv2_plugin_info ().begin (), manager.lv2_plugin_info ().end ()); -#endif all_plugs.insert (all_plugs.end (), manager.lua_plugin_info ().begin (), manager.lua_plugin_info ().end ()); for (PluginInfoList::const_iterator i = all_plugs.begin (); i != all_plugs.end (); ++i) { diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index 72a0853cb0..29aa4137c7 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -53,6 +53,7 @@ #include "ardour/chan_mapping.h" #include "ardour/data_type.h" #include "ardour/luaproc.h" +#include "ardour/lv2_plugin.h" #include "ardour/midi_buffer.h" #include "ardour/midi_state_tracker.h" #include "ardour/plugin.h" @@ -65,10 +66,6 @@ #include "ardour/audio_unit.h" #endif -#ifdef LV2_SUPPORT -#include "ardour/lv2_plugin.h" -#endif - #include "pbd/stl_delete.h" #include "pbd/i18n.h" @@ -215,11 +212,9 @@ ARDOUR::find_plugin(Session& session, string identifier, PluginType type) plugs = mgr.ladspa_plugin_info(); break; -#ifdef LV2_SUPPORT case ARDOUR::LV2: plugs = mgr.lv2_plugin_info(); break; -#endif #ifdef WINDOWS_VST_SUPPORT case ARDOUR::Windows_VST: diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 18f49cd764..a3ab4cbfc0 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -39,14 +39,11 @@ #include "ardour/event_type_map.h" #include "ardour/ladspa_plugin.h" #include "ardour/luaproc.h" +#include "ardour/lv2_plugin.h" #include "ardour/plugin.h" #include "ardour/plugin_insert.h" #include "ardour/port.h" -#ifdef LV2_SUPPORT -#include "ardour/lv2_plugin.h" -#endif - #ifdef WINDOWS_VST_SUPPORT #include "ardour/windows_vst_plugin.h" #endif @@ -1434,9 +1431,7 @@ PluginInsert::plugin_factory (boost::shared_ptr other) { boost::shared_ptr lp; boost::shared_ptr lua; -#ifdef LV2_SUPPORT boost::shared_ptr lv2p; -#endif #ifdef WINDOWS_VST_SUPPORT boost::shared_ptr vp; #endif @@ -1454,10 +1449,8 @@ PluginInsert::plugin_factory (boost::shared_ptr other) return boost::shared_ptr (new LadspaPlugin (*lp)); } else if ((lua = boost::dynamic_pointer_cast (other)) != 0) { return boost::shared_ptr (new LuaProc (*lua)); -#ifdef LV2_SUPPORT } else if ((lv2p = boost::dynamic_pointer_cast (other)) != 0) { return boost::shared_ptr (new LV2Plugin (*lv2p)); -#endif #ifdef WINDOWS_VST_SUPPORT } else if ((vp = boost::dynamic_pointer_cast (other)) != 0) { return boost::shared_ptr (new WindowsVSTPlugin (*vp)); @@ -2523,7 +2516,6 @@ PluginInsert::set_control_ids (const XMLNode& node, int version) } uint32_t p = (uint32_t)-1; -#ifdef LV2_SUPPORT std::string str; if ((*iter)->get_property (X_("symbol"), str)) { boost::shared_ptr lv2plugin = boost::dynamic_pointer_cast (_plugins[0]); @@ -2531,7 +2523,6 @@ PluginInsert::set_control_ids (const XMLNode& node, int version) p = lv2plugin->port_index(str.c_str()); } } -#endif if (p == (uint32_t)-1) { (*iter)->get_property (X_("parameter"), p); } @@ -2568,7 +2559,7 @@ PluginInsert::update_control_values (const XMLNode& node, int version) } uint32_t p = (uint32_t)-1; -#ifdef LV2_SUPPORT + std::string str; if ((*iter)->get_property (X_("symbol"), str)) { boost::shared_ptr lv2plugin = boost::dynamic_pointer_cast (_plugins[0]); @@ -2576,7 +2567,7 @@ PluginInsert::update_control_values (const XMLNode& node, int version) p = lv2plugin->port_index(str.c_str()); } } -#endif + if (p == (uint32_t)-1) { (*iter)->get_property (X_("parameter"), p); } @@ -3041,12 +3032,11 @@ PluginInsert::PluginControl::get_state () { XMLNode& node (AutomationControl::get_state()); node.set_property (X_("parameter"), parameter().id()); -#ifdef LV2_SUPPORT + boost::shared_ptr lv2plugin = boost::dynamic_pointer_cast (_plugin->_plugins[0]); if (lv2plugin) { node.set_property (X_("symbol"), lv2plugin->port_symbol (parameter().id())); } -#endif return node; } diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index e475644279..55d79aebe9 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -87,15 +87,13 @@ #include "ardour/ladspa_plugin.h" #include "ardour/luascripting.h" #include "ardour/luaproc.h" +#include "ardour/lv2_plugin.h" #include "ardour/plugin.h" #include "ardour/plugin_manager.h" #include "ardour/rc_configuration.h" #include "ardour/search_paths.h" -#ifdef LV2_SUPPORT -#include "ardour/lv2_plugin.h" -#endif #ifdef WINDOWS_VST_SUPPORT #include "ardour/windows_vst_plugin.h" @@ -353,7 +351,7 @@ PluginManager::refresh (bool cache_only) ladspa_refresh (); BootMessage (_("Scanning Lua DSP Processors")); lua_refresh (); -#ifdef LV2_SUPPORT + BootMessage (_("Scanning LV2 Plugins")); lv2_refresh (); @@ -377,7 +375,7 @@ PluginManager::refresh (bool cache_only) } } } -#endif + #ifdef WINDOWS_VST_SUPPORT if (Config->get_use_windows_vst()) { if (cache_only) { @@ -944,7 +942,6 @@ PluginManager::get_ladspa_category (uint32_t plugin_id) #endif } -#ifdef LV2_SUPPORT void PluginManager::lv2_refresh () { @@ -956,7 +953,6 @@ PluginManager::lv2_refresh () set_tags ((*i)->type, (*i)->unique_id, (*i)->category, (*i)->name, FromPlug); } } -#endif #ifdef AUDIOUNIT_SUPPORT void @@ -2083,12 +2079,8 @@ PluginManager::ladspa_plugin_info () const ARDOUR::PluginInfoList& PluginManager::lv2_plugin_info () { -#ifdef LV2_SUPPORT assert(_lv2_plugin_info); return *_lv2_plugin_info; -#else - return _empty_plugin_info; -#endif } const ARDOUR::PluginInfoList& diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 240d964ec5..bccae20c8f 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -106,9 +106,7 @@ #include "ardour/filename_extensions.h" #include "ardour/graph.h" #include "ardour/location.h" -#ifdef LV2_SUPPORT #include "ardour/lv2_plugin.h" -#endif #include "ardour/midi_model.h" #include "ardour/midi_region.h" #include "ardour/midi_scene_changer.h"