From c78528dcea03a61685ad0586eaa6302847af6fe9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 14 May 2011 17:59:16 +0000 Subject: [PATCH] Use LV2_SUPPORT define instead of HAVE_SLV2. git-svn-id: svn://localhost/ardour2/branches/3.0@9510 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/plugin_ui.cc | 4 ++-- libs/ardour/ardour/buffer_set.h | 6 +++--- libs/ardour/ardour/plugin_manager.h | 6 +++--- libs/ardour/buffer_set.cc | 8 ++++---- libs/ardour/plugin.cc | 4 ++-- libs/ardour/plugin_insert.cc | 6 +++--- libs/ardour/plugin_manager.cc | 13 ++++++------- libs/ardour/wscript | 3 +++ wscript | 2 +- 9 files changed, 27 insertions(+), 25 deletions(-) diff --git a/gtk2_ardour/plugin_ui.cc b/gtk2_ardour/plugin_ui.cc index a549cfa975..7d93239952 100644 --- a/gtk2_ardour/plugin_ui.cc +++ b/gtk2_ardour/plugin_ui.cc @@ -50,7 +50,7 @@ #include "ardour/vst_plugin.h" #include "vst_pluginui.h" #endif -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT #include "ardour/lv2_plugin.h" #include "lv2_plugin_ui.h" #endif @@ -317,7 +317,7 @@ PluginUIWindow::app_activated (bool) bool PluginUIWindow::create_lv2_editor(boost::shared_ptr insert) { -#ifndef HAVE_SLV2 +#ifndef LV2_SUPPORT return false; #else diff --git a/libs/ardour/ardour/buffer_set.h b/libs/ardour/ardour/buffer_set.h index 9ba44e9481..05e0e42d1f 100644 --- a/libs/ardour/ardour/buffer_set.h +++ b/libs/ardour/ardour/buffer_set.h @@ -41,7 +41,7 @@ class Buffer; class AudioBuffer; class MidiBuffer; class PortSet; -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT class LV2EventBuffer; #endif @@ -108,7 +108,7 @@ public: return (const MidiBuffer&)get(DataType::MIDI, i); } -#ifdef HAVE_SLV2 +#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 happen as needed */ @@ -170,7 +170,7 @@ private: /// Vector of vectors, indexed by DataType std::vector _buffers; -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT /// LV2 MIDI buffers (for conversion to/from MIDI buffers) typedef std::vector< std::pair > LV2Buffers; LV2Buffers _lv2_buffers; diff --git a/libs/ardour/ardour/plugin_manager.h b/libs/ardour/ardour/plugin_manager.h index b7385ad0aa..2d60bf53f6 100644 --- a/libs/ardour/ardour/plugin_manager.h +++ b/libs/ardour/ardour/plugin_manager.h @@ -33,7 +33,7 @@ #include "ardour/types.h" #include "ardour/plugin.h" -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT #include "ardour/lv2_plugin.h" #endif @@ -56,7 +56,7 @@ class PluginManager : public boost::noncopyable { int add_ladspa_directory (std::string dirpath); int add_vst_directory (std::string dirpath); -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT LV2World* lv2_world() { return _lv2_world; } #endif @@ -107,7 +107,7 @@ class PluginManager : public boost::noncopyable { ARDOUR::PluginInfoList* _lv2_plugin_info; ARDOUR::PluginInfoList* _au_plugin_info; -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT LV2World* _lv2_world; #endif diff --git a/libs/ardour/buffer_set.cc b/libs/ardour/buffer_set.cc index 281e6303fa..46069e83b4 100644 --- a/libs/ardour/buffer_set.cc +++ b/libs/ardour/buffer_set.cc @@ -31,7 +31,7 @@ #include "ardour/port.h" #include "ardour/port_set.h" #include "ardour/audioengine.h" -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT #include "ardour/lv2_plugin.h" #include "ardour/lv2_event_buffer.h" #endif @@ -178,7 +178,7 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac _count.set (type, num_buffers); } -#ifdef HAVE_SLV2 +#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) { @@ -240,7 +240,7 @@ BufferSet::get(DataType type, size_t i) const return *_buffers[type][i]; } -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT LV2EventBuffer& BufferSet::get_lv2_midi(bool input, size_t i) @@ -293,7 +293,7 @@ BufferSet::flush_lv2_midi(bool input, size_t i) } } -#endif /* HAVE_SLV2 */ +#endif /* LV2_SUPPORT */ #ifdef VST_SUPPORT diff --git a/libs/ardour/plugin.cc b/libs/ardour/plugin.cc index 04db01889b..b6e433c0b0 100644 --- a/libs/ardour/plugin.cc +++ b/libs/ardour/plugin.cc @@ -49,7 +49,7 @@ #include "ardour/audio_unit.h" #endif -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT #include "ardour/lv2_plugin.h" #endif @@ -127,7 +127,7 @@ ARDOUR::find_plugin(Session& session, string identifier, PluginType type) plugs = mgr->ladspa_plugin_info(); break; -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT case ARDOUR::LV2: plugs = mgr->lv2_plugin_info(); break; diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index 48ffb9bf0c..4ba82eb4d2 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -37,7 +37,7 @@ #include "ardour/port.h" #include "ardour/route.h" -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT #include "ardour/lv2_plugin.h" #endif @@ -549,7 +549,7 @@ boost::shared_ptr PluginInsert::plugin_factory (boost::shared_ptr other) { boost::shared_ptr lp; -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT boost::shared_ptr lv2p; #endif #ifdef VST_SUPPORT @@ -561,7 +561,7 @@ PluginInsert::plugin_factory (boost::shared_ptr other) if ((lp = boost::dynamic_pointer_cast (other)) != 0) { return boost::shared_ptr (new LadspaPlugin (*lp)); -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT } else if ((lv2p = boost::dynamic_pointer_cast (other)) != 0) { return boost::shared_ptr (new LV2Plugin (*lv2p)); #endif diff --git a/libs/ardour/plugin_manager.cc b/libs/ardour/plugin_manager.cc index 5f01d49a64..be588dcdb2 100644 --- a/libs/ardour/plugin_manager.cc +++ b/libs/ardour/plugin_manager.cc @@ -48,8 +48,7 @@ #include "ardour/ladspa_plugin.h" #include "ardour/filesystem_paths.h" -#ifdef HAVE_SLV2 -#include +#ifdef LV2_SUPPORT #include "ardour/lv2_plugin.h" #endif @@ -134,7 +133,7 @@ PluginManager::PluginManager () ladspa_plugin_whitelist.push_back (2150); // tap pitch shifter } -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT _lv2_world = new LV2World(); #endif @@ -144,7 +143,7 @@ PluginManager::PluginManager () PluginManager::~PluginManager() { -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT delete _lv2_world; #endif } @@ -154,7 +153,7 @@ void PluginManager::refresh () { ladspa_refresh (); -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT lv2_refresh (); #endif #ifdef VST_SUPPORT @@ -471,7 +470,7 @@ PluginManager::get_ladspa_category (uint32_t plugin_id) } } -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT void PluginManager::lv2_refresh () { @@ -768,7 +767,7 @@ PluginManager::ladspa_plugin_info () ARDOUR::PluginInfoList& PluginManager::lv2_plugin_info () { -#ifdef HAVE_SLV2 +#ifdef LV2_SUPPORT if (!_lv2_plugin_info) lv2_refresh(); return *_lv2_plugin_info; diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 7fd189b86d..b81e0c6b75 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -295,6 +295,9 @@ def configure(conf): if ogg_supported(): conf.define ('HAVE_OGG', 1) + if conf.env['HAVE_SLV2']: + conf.define ('LV2_SUPPORT', 1) + conf.write_config_header('libardour-config.h') # Boost headers diff --git a/wscript b/wscript index 8ae4ccbe20..9f1ecb9802 100644 --- a/wscript +++ b/wscript @@ -533,7 +533,7 @@ def configure(conf): autowaf.display_msg(conf, 'Freesound', opts.freesound) if opts.freesound: conf.define('FREESOUND',1) - autowaf.display_msg(conf, 'LV2 Support', bool(conf.env['HAVE_SLV2'])) + autowaf.display_msg(conf, 'LV2 Support', bool(conf.env['LV2_SUPPORT'])) autowaf.display_msg(conf, 'LV2 UI Embedding', bool(conf.env['HAVE_SUIL'])) autowaf.display_msg(conf, 'OGG', bool(conf.env['HAVE_OGG'])) autowaf.display_msg(conf, 'Rubberband', bool(conf.env['HAVE_RUBBERBAND'])) -- 2.30.2