13
0

Remove support for building against LV2 older than 1.2.0

LV2 1.2.0 was released in 2012, over 6 years ago now.
This commit is contained in:
David Robillard 2019-03-31 19:19:21 +02:00
parent 5f18d8ddfd
commit 30d59c8f6e
4 changed files with 4 additions and 37 deletions

View File

@ -83,10 +83,8 @@
#include "lv2/lv2plug.in/ns/ext/patch/patch.h"
#include "lv2/lv2plug.in/ns/ext/port-groups/port-groups.h"
#include "lv2/lv2plug.in/ns/ext/parameters/parameters.h"
#ifdef HAVE_LV2_1_2_0
#include "lv2/lv2plug.in/ns/ext/buf-size/buf-size.h"
#include "lv2/lv2plug.in/ns/ext/options/options.h"
#endif
#include "lv2_evbuf.h"
@ -182,12 +180,10 @@ public:
LilvNode* patch_writable;
LilvNode* patch_Message;
LilvNode* opts_requiredOptions;
#ifdef HAVE_LV2_1_2_0
LilvNode* bufz_powerOf2BlockLength;
LilvNode* bufz_fixedBlockLength;
LilvNode* bufz_nominalBlockLength;
LilvNode* bufz_coarseBlockLength;
#endif
#ifdef HAVE_LV2_1_10_0
LilvNode* atom_int;
@ -313,14 +309,10 @@ log_printf(LV2_Log_Handle handle,
struct LV2Plugin::Impl {
Impl() : plugin(0), ui(0), ui_type(0), name(0), author(0), instance(0)
, work_iface(0)
#ifdef HAVE_LV2_1_2_0
, opts_iface(0)
#endif
, state(0)
, block_length(0)
#ifdef HAVE_LV2_1_2_0
, options(0)
#endif
#ifdef LV2_EXTENDED
, queue_draw(0)
, midnam(0)
@ -339,16 +331,12 @@ struct LV2Plugin::Impl {
LilvNode* author;
LilvInstance* instance;
const LV2_Worker_Interface* work_iface;
#ifdef HAVE_LV2_1_2_0
const LV2_Options_Interface* opts_iface;
#endif
LilvState* state;
LV2_Atom_Forge forge;
LV2_Atom_Forge ui_forge;
int32_t block_length;
#ifdef HAVE_LV2_1_2_0
LV2_Options_Option* options;
#endif
#ifdef LV2_EXTENDED
LV2_Inline_Display* queue_draw;
LV2_Midnam* midnam;
@ -465,9 +453,7 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
_features[6] = &_log_feature;
unsigned n_features = 7;
#ifdef HAVE_LV2_1_2_0
_features[n_features++] = &_def_state_feature;
#endif
lv2_atom_forge_init(&_impl->forge, _uri_map.urid_map());
lv2_atom_forge_init(&_impl->ui_forge, _uri_map.urid_map());
@ -501,7 +487,6 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
_features[n_features++] = &_bankpatch_feature;
#endif
#ifdef HAVE_LV2_1_2_0
LV2_URID atom_Int = _uri_map.uri_to_id(LV2_ATOM__Int);
static const int32_t _min_block_length = 1; // may happen during split-cycles
static const int32_t _max_block_length = 8192; // max possible (with all engines and during export)
@ -536,7 +521,6 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
_options_feature.URI = LV2_OPTIONS__options;
_options_feature.data = _impl->options;
_features[n_features++] = &_options_feature;
#endif
#ifdef LV2_EXTENDED
seen_bankpatch = false;
@ -595,15 +579,12 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
}
lilv_node_free(worker_iface_uri);
#ifdef HAVE_LV2_1_2_0
LilvNode* options_iface_uri = lilv_new_uri(_world.world, LV2_OPTIONS__interface);
if (lilv_plugin_has_extension_data(plugin, options_iface_uri)) {
_impl->opts_iface = (const LV2_Options_Interface*)extension_data(
LV2_OPTIONS__interface);
}
lilv_node_free(options_iface_uri);
#endif
#ifdef LV2_EXTENDED
_display_interface = (const LV2_Inline_Display_Interface*)
@ -627,11 +608,10 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
}
LilvNodes* optional_features = lilv_plugin_get_optional_features (plugin);
#ifdef HAVE_LV2_1_2_0
if (lilv_nodes_contains (optional_features, _world.bufz_coarseBlockLength)) {
_no_sample_accurate_ctrl = true;
}
#endif
#ifdef LV2_EXTENDED
if (lilv_nodes_contains (optional_features, _world.lv2_noSampleAccurateCtrl)) {
/* deprecated 2016-Sep-18 in favor of bufz_coarseBlockLength */
@ -873,7 +853,6 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
int
LV2Plugin::set_block_size (pframes_t nframes)
{
#ifdef HAVE_LV2_1_2_0
if (_impl->opts_iface) {
LV2_URID atom_Int = _uri_map.uri_to_id(LV2_ATOM__Int);
_impl->block_length = nframes;
@ -883,7 +862,7 @@ LV2Plugin::set_block_size (pframes_t nframes)
};
_impl->opts_iface->set (_impl->instance->lv2_handle, &block_size_option);
}
#endif
return 0;
}
@ -933,9 +912,7 @@ LV2Plugin::~LV2Plugin ()
lilv_state_free(_impl->state);
lilv_node_free(_impl->name);
lilv_node_free(_impl->author);
#ifdef HAVE_LV2_1_2_0
free(_impl->options);
#endif
#ifdef LV2_EXTENDED
free(_impl->queue_draw);
free(_impl->midnam);
@ -3253,13 +3230,10 @@ LV2World::LV2World()
auto_automation_controller = lilv_new_uri(world, LV2_AUTOMATE_URI__controller);
inline_display_in_gui = lilv_new_uri(world, LV2_INLINEDISPLAY__in_gui);
#endif
#ifdef HAVE_LV2_1_2_0
bufz_powerOf2BlockLength = lilv_new_uri(world, LV2_BUF_SIZE__powerOf2BlockLength);
bufz_fixedBlockLength = lilv_new_uri(world, LV2_BUF_SIZE__fixedBlockLength);
bufz_nominalBlockLength = lilv_new_uri(world, "http://lv2plug.in/ns/ext/buf-size#nominalBlockLength");
bufz_coarseBlockLength = lilv_new_uri(world, "http://lv2plug.in/ns/ext/buf-size#coarseBlockLength");
#endif
}
LV2World::~LV2World()
@ -3267,12 +3241,10 @@ LV2World::~LV2World()
if (!world) {
return;
}
#ifdef HAVE_LV2_1_2_0
lilv_node_free(bufz_coarseBlockLength);
lilv_node_free(bufz_nominalBlockLength);
lilv_node_free(bufz_fixedBlockLength);
lilv_node_free(bufz_powerOf2BlockLength);
#endif
#ifdef LV2_EXTENDED
lilv_node_free(lv2_noSampleAccurateCtrl);
lilv_node_free(auto_can_write_automatation);
@ -3472,7 +3444,6 @@ LV2PluginInfo::discover()
continue;
}
#ifdef HAVE_LV2_1_2_0
int err = 0;
LilvNodes* required_features = lilv_plugin_get_required_features (p);
LILV_FOREACH(nodes, i, required_features) {
@ -3523,7 +3494,6 @@ LV2PluginInfo::discover()
if (err) {
continue;
}
#endif
info->type = LV2;

View File

@ -300,9 +300,7 @@ def configure(conf):
atleast_version='2.0')
autowaf.check_pkg(conf, 'lv2', uselib_store='LV2',
atleast_version='1.0.0', mandatory=True)
autowaf.check_pkg(conf, 'lv2', uselib_store='LV2_1_2_0',
atleast_version='1.2.0', mandatory=False)
atleast_version='1.2.0', mandatory=True)
autowaf.check_pkg(conf, 'lv2', uselib_store='LV2_1_10_0',
atleast_version='1.10.0', mandatory=False)
autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD',

View File

@ -7,7 +7,6 @@
#define LV2_SUPPORT 1
#define HAVE_SUIL 1
#define HAVE_LV2 1
#define HAVE_LV2_1_2_0 1
/* Comment out the above lines to build Mixbus without LV2 support */
#endif

View File

@ -16,7 +16,7 @@ time ./tools/doxy2json/doxy2json -j 4 \
-D PROGRAM_NAME=\"Ardour\" -D PROGRAM_VERSION=\"4\" -D LOCALEDIR=\"/\" \
-D ARCH_X86 -D CONFIG_ARCH=\"x86_64\" -D WAF_BUILD \
-D HAVE_AUBIO=1 -D HAVE_ALSA=1 -D HAVE_GLIB=1 -D HAVE_LIBS_LUA=1 -D HAVE_XML=1 -D PTFORMAT=1 \
-D HAVE_SAMPLERATE=1 -D HAVE_LV2=1 -D HAVE_LV2_1_2_0=1 -D HAVE_LV2_1_10_0=1 -D HAVE_SERD=1 -D HAVE_SORD=1 -D HAVE_SRATOM=1 -D HAVE_LILV=1 -D HAVE_LV2_1_0_0=1 \
-D HAVE_SAMPLERATE=1 -D HAVE_LV2=1 -D HAVE_LV2_1_10_0=1 -D HAVE_SERD=1 -D HAVE_SORD=1 -D HAVE_SRATOM=1 -D HAVE_LILV=1 -D HAVE_LV2_1_0_0=1 \
-D HAVE_LILV_0_16_0=1 -D HAVE_LILV_0_19_2=1 -D HAVE_LILV_0_21_3=1 -D HAVE_SUIL=1 -D LV2_SUPPORT=1 -D LV2_EXTENDED=1 -D HAVE_GTK=1 -D HAVE_LIBS_GTKMM2EXT=1 \
-D HAVE_X11=1 -D LXVST_64BIT=1 -D LXVST_SUPPORT=1 -D HAVE_TAGLIB=1 -D HAVE_POSIX_MEMALIGN=1 -D HAVE_VAMPSDK=1 -D HAVE_VAMPHOSTSDK=1 -D HAVE_RUBBERBAND=1 -D ENABLE_NLS=1 \
-D HAVE_CURL=1 -D HAVE_LO=1 -D HAVE_LRDF=1 -D _VAMP_NO_PLUGIN_NAMESPACE=1 \