WIP: Remove support for deprecated LV2 event extension

Not tested whatsoever, don't merge this.
This commit is contained in:
David Robillard 2020-07-08 21:19:30 +02:00
parent c12cabd418
commit c4f8a01ff0
6 changed files with 64 additions and 193 deletions

View file

@ -115,10 +115,9 @@ public:
/** Get a MIDI buffer translated into an LV2 MIDI buffer for use with /** Get a MIDI buffer translated into an LV2 MIDI buffer for use with
* plugins. The index here corresponds directly to MIDI buffer numbers * plugins. The index here corresponds directly to MIDI buffer numbers
* (i.e. the index passed to get_midi), translation back and forth will * (i.e. the index passed to get_midi), translation back and forth will
* happen as needed. If old_api is true, the returned buffer will be in * happen as needed.
* old event format. Otherwise it will be in new atom sequence format.
*/ */
LV2_Evbuf* get_lv2_midi(bool input, size_t i, bool old_api); LV2_Evbuf* get_lv2_midi(bool input, size_t i);
/** ensure minimum size of LV2 Atom port buffer */ /** ensure minimum size of LV2 Atom port buffer */
void ensure_lv2_bufsize(bool input, size_t i, size_t buffer_capacity); void ensure_lv2_bufsize(bool input, size_t i, size_t buffer_capacity);

View file

@ -125,7 +125,6 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee
bool parameter_is_audio (uint32_t) const; bool parameter_is_audio (uint32_t) const;
bool parameter_is_control (uint32_t) const; bool parameter_is_control (uint32_t) const;
bool parameter_is_event (uint32_t) const;
bool parameter_is_input (uint32_t) const; bool parameter_is_input (uint32_t) const;
bool parameter_is_output (uint32_t) const; bool parameter_is_output (uint32_t) const;
bool parameter_is_toggled (uint32_t) const; bool parameter_is_toggled (uint32_t) const;
@ -242,7 +241,6 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee
PORT_OUTPUT = 1 << 1, ///< Output port PORT_OUTPUT = 1 << 1, ///< Output port
PORT_AUDIO = 1 << 2, ///< Audio (buffer of float) PORT_AUDIO = 1 << 2, ///< Audio (buffer of float)
PORT_CONTROL = 1 << 3, ///< Control (single float) PORT_CONTROL = 1 << 3, ///< Control (single float)
PORT_EVENT = 1 << 4, ///< Old event API event port
PORT_SEQUENCE = 1 << 5, ///< New atom API event port PORT_SEQUENCE = 1 << 5, ///< New atom API event port
PORT_MIDI = 1 << 6, ///< Event port understands MIDI PORT_MIDI = 1 << 6, ///< Event port understands MIDI
PORT_POSITION = 1 << 7, ///< Event port understands position PORT_POSITION = 1 << 7, ///< Event port understands position

View file

@ -197,7 +197,6 @@ BufferSet::ensure_buffers(DataType type, size_t num_buffers, size_t buffer_capac
while (_lv2_buffers.size() < _buffers[type].size() * 2) { while (_lv2_buffers.size() < _buffers[type].size() * 2) {
_lv2_buffers.push_back( _lv2_buffers.push_back(
std::make_pair(false, lv2_evbuf_new(buffer_capacity, std::make_pair(false, lv2_evbuf_new(buffer_capacity,
LV2_EVBUF_EVENT,
URIMap::instance().urids.atom_Chunk, URIMap::instance().urids.atom_Chunk,
URIMap::instance().urids.atom_Sequence))); URIMap::instance().urids.atom_Sequence)));
} }
@ -269,20 +268,18 @@ BufferSet::ensure_lv2_bufsize(bool input, size_t i, size_t buffer_capacity)
_lv2_buffers.at(i * 2 + (input ? 0 : 1)) = _lv2_buffers.at(i * 2 + (input ? 0 : 1)) =
std::make_pair(false, lv2_evbuf_new( std::make_pair(false, lv2_evbuf_new(
buffer_capacity, buffer_capacity,
LV2_EVBUF_EVENT,
URIMap::instance().urids.atom_Chunk, URIMap::instance().urids.atom_Chunk,
URIMap::instance().urids.atom_Sequence)); URIMap::instance().urids.atom_Sequence));
} }
LV2_Evbuf* LV2_Evbuf*
BufferSet::get_lv2_midi(bool input, size_t i, bool old_api) BufferSet::get_lv2_midi(bool input, size_t i)
{ {
assert(count().get(DataType::MIDI) > i); assert(count().get(DataType::MIDI) > i);
LV2Buffers::value_type b = _lv2_buffers.at(i * 2 + (input ? 0 : 1)); LV2Buffers::value_type b = _lv2_buffers.at(i * 2 + (input ? 0 : 1));
LV2_Evbuf* evbuf = b.second; LV2_Evbuf* evbuf = b.second;
lv2_evbuf_set_type(evbuf, old_api ? LV2_EVBUF_EVENT : LV2_EVBUF_ATOM);
lv2_evbuf_reset(evbuf, input); lv2_evbuf_reset(evbuf, input);
return evbuf; return evbuf;
} }

View file

@ -24,14 +24,10 @@
#include "lv2_evbuf.h" #include "lv2_evbuf.h"
struct LV2_Evbuf_Impl { struct LV2_Evbuf_Impl {
LV2_Evbuf_Type type; uint32_t capacity;
uint32_t capacity; uint32_t atom_Chunk;
uint32_t atom_Chunk; uint32_t atom_Sequence;
uint32_t atom_Sequence; LV2_Atom_Sequence atom;
union {
LV2_Event_Buffer event;
LV2_Atom_Sequence atom;
} buf;
}; };
static inline uint32_t static inline uint32_t
@ -42,7 +38,6 @@ lv2_evbuf_pad_size(uint32_t size)
LV2_Evbuf* LV2_Evbuf*
lv2_evbuf_new(uint32_t capacity, lv2_evbuf_new(uint32_t capacity,
LV2_Evbuf_Type type,
uint32_t atom_Chunk, uint32_t atom_Chunk,
uint32_t atom_Sequence) uint32_t atom_Sequence)
{ {
@ -52,7 +47,6 @@ lv2_evbuf_new(uint32_t capacity,
evbuf->capacity = capacity; evbuf->capacity = capacity;
evbuf->atom_Chunk = atom_Chunk; evbuf->atom_Chunk = atom_Chunk;
evbuf->atom_Sequence = atom_Sequence; evbuf->atom_Sequence = atom_Sequence;
lv2_evbuf_set_type(evbuf, type);
lv2_evbuf_reset(evbuf, true); lv2_evbuf_reset(evbuf, true);
return evbuf; return evbuf;
} }
@ -63,56 +57,27 @@ lv2_evbuf_free(LV2_Evbuf* evbuf)
free(evbuf); free(evbuf);
} }
void
lv2_evbuf_set_type(LV2_Evbuf* evbuf, LV2_Evbuf_Type type)
{
evbuf->type = type;
switch (type) {
case LV2_EVBUF_EVENT:
evbuf->buf.event.data = (uint8_t*)(evbuf + 1);
evbuf->buf.event.capacity = evbuf->capacity;
break;
case LV2_EVBUF_ATOM:
break;
}
lv2_evbuf_reset(evbuf, true);
}
void void
lv2_evbuf_reset(LV2_Evbuf* evbuf, bool input) lv2_evbuf_reset(LV2_Evbuf* evbuf, bool input)
{ {
switch (evbuf->type) { if (input) {
case LV2_EVBUF_EVENT: evbuf->atom.atom.size = sizeof(LV2_Atom_Sequence_Body);
evbuf->buf.event.header_size = sizeof(LV2_Event_Buffer); evbuf->atom.atom.type = evbuf->atom_Sequence;
evbuf->buf.event.stamp_type = LV2_EVENT_AUDIO_STAMP; } else {
evbuf->buf.event.event_count = 0; evbuf->atom.atom.size = evbuf->capacity;
evbuf->buf.event.size = 0; evbuf->atom.atom.type = evbuf->atom_Chunk;
break;
case LV2_EVBUF_ATOM:
if (input) {
evbuf->buf.atom.atom.size = sizeof(LV2_Atom_Sequence_Body);
evbuf->buf.atom.atom.type = evbuf->atom_Sequence;
} else {
evbuf->buf.atom.atom.size = evbuf->capacity;
evbuf->buf.atom.atom.type = evbuf->atom_Chunk;
}
} }
} }
uint32_t uint32_t
lv2_evbuf_get_size(LV2_Evbuf* evbuf) lv2_evbuf_get_size(LV2_Evbuf* evbuf)
{ {
switch (evbuf->type) { assert(evbuf->atom.atom.type != evbuf->atom_Sequence
case LV2_EVBUF_EVENT: || evbuf->atom.atom.size >= sizeof(LV2_Atom_Sequence_Body));
return evbuf->buf.event.size;
case LV2_EVBUF_ATOM: return evbuf->atom.atom.type == evbuf->atom_Sequence
assert(evbuf->buf.atom.atom.type != evbuf->atom_Sequence ? evbuf->atom.atom.size - sizeof(LV2_Atom_Sequence_Body)
|| evbuf->buf.atom.atom.size >= sizeof(LV2_Atom_Sequence_Body)); : 0;
return evbuf->buf.atom.atom.type == evbuf->atom_Sequence
? evbuf->buf.atom.atom.size - sizeof(LV2_Atom_Sequence_Body)
: 0;
}
return 0;
} }
uint32_t uint32_t
@ -124,13 +89,7 @@ lv2_evbuf_get_capacity(LV2_Evbuf* evbuf)
void* void*
lv2_evbuf_get_buffer(LV2_Evbuf* evbuf) lv2_evbuf_get_buffer(LV2_Evbuf* evbuf)
{ {
switch (evbuf->type) { return &evbuf->atom;
case LV2_EVBUF_EVENT:
return &evbuf->buf.event;
case LV2_EVBUF_ATOM:
return &evbuf->buf.atom;
}
return NULL;
} }
LV2_Evbuf_Iterator LV2_Evbuf_Iterator
@ -163,19 +122,13 @@ lv2_evbuf_next(LV2_Evbuf_Iterator iter)
LV2_Evbuf* evbuf = iter.evbuf; LV2_Evbuf* evbuf = iter.evbuf;
uint32_t offset = iter.offset; uint32_t offset = iter.offset;
uint32_t size; uint32_t size =
switch (evbuf->type) { ((LV2_Atom_Event*)((uintptr_t)(
case LV2_EVBUF_EVENT: (char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, &evbuf->atom) +
size = ((LV2_Event*)((uintptr_t)(evbuf->buf.event.data + offset)))->size; offset)))
offset += lv2_evbuf_pad_size(sizeof(LV2_Event) + size); ->body.size;
break;
case LV2_EVBUF_ATOM: offset += lv2_evbuf_pad_size(sizeof(LV2_Atom_Event) + size);
size = ((LV2_Atom_Event*)((uintptr_t)
((char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, &evbuf->buf.atom)
+ offset)))->body.size;
offset += lv2_evbuf_pad_size(sizeof(LV2_Atom_Event) + size);
break;
}
LV2_Evbuf_Iterator next = { evbuf, offset }; LV2_Evbuf_Iterator next = { evbuf, offset };
return next; return next;
@ -196,32 +149,15 @@ lv2_evbuf_get(LV2_Evbuf_Iterator iter,
return false; return false;
} }
LV2_Event_Buffer* ebuf; LV2_Atom_Sequence* aseq = (LV2_Atom_Sequence*)&iter.evbuf->atom;
LV2_Event* ev; LV2_Atom_Event* aev = (LV2_Atom_Event*)((uintptr_t)(
LV2_Atom_Sequence* aseq; (char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq) + iter.offset));
LV2_Atom_Event* aev;
switch (iter.evbuf->type) { *samples = aev->time.frames;
case LV2_EVBUF_EVENT: *subframes = 0;
ebuf = &iter.evbuf->buf.event; *type = aev->body.type;
ev = (LV2_Event*)((uintptr_t)((char*)ebuf->data + iter.offset)); *size = aev->body.size;
*samples = ev->frames; *data = (uint8_t*)LV2_ATOM_BODY(&aev->body);
*subframes = ev->subframes;
*type = ev->type;
*size = ev->size;
*data = (uint8_t*)ev + sizeof(LV2_Event);
break;
case LV2_EVBUF_ATOM:
aseq = (LV2_Atom_Sequence*)&iter.evbuf->buf.atom;
aev = (LV2_Atom_Event*)((uintptr_t)(
(char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)
+ iter.offset));
*samples = aev->time.frames;
*subframes = 0;
*type = aev->body.type;
*size = aev->body.size;
*data = (uint8_t*)LV2_ATOM_BODY(&aev->body);
break;
}
return true; return true;
} }
@ -234,51 +170,24 @@ lv2_evbuf_write(LV2_Evbuf_Iterator* iter,
uint32_t size, uint32_t size,
const uint8_t* data) const uint8_t* data)
{ {
LV2_Event_Buffer* ebuf; LV2_Atom_Sequence* aseq = (LV2_Atom_Sequence*)&iter->evbuf->atom;
LV2_Event* ev;
LV2_Atom_Sequence* aseq;
LV2_Atom_Event* aev;
switch (iter->evbuf->type) {
case LV2_EVBUF_EVENT:
ebuf = &iter->evbuf->buf.event;
if (ebuf->capacity - ebuf->size < sizeof(LV2_Event) + size) {
return false;
}
ev = (LV2_Event*)((uintptr_t)(ebuf->data + iter->offset)); if (iter->evbuf->capacity - sizeof(LV2_Atom) - aseq->atom.size
ev->frames = samples; < sizeof(LV2_Atom_Event) + size) {
ev->subframes = subframes;
ev->type = type;
ev->size = size;
memcpy((uint8_t*)ev + sizeof(LV2_Event), data, size);
size = lv2_evbuf_pad_size(sizeof(LV2_Event) + size);
ebuf->size += size;
ebuf->event_count += 1;
iter->offset += size;
break;
case LV2_EVBUF_ATOM:
aseq = (LV2_Atom_Sequence*)&iter->evbuf->buf.atom;
if (iter->evbuf->capacity - sizeof(LV2_Atom) - aseq->atom.size
< sizeof(LV2_Atom_Event) + size) {
return false;
}
aev = (LV2_Atom_Event*)((uintptr_t)(
(char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq)
+ iter->offset));
aev->time.frames = samples;
aev->body.type = type;
aev->body.size = size;
memcpy(LV2_ATOM_BODY(&aev->body), data, size);
size = lv2_evbuf_pad_size(sizeof(LV2_Atom_Event) + size);
aseq->atom.size += size;
iter->offset += size;
break;
default:
return false; return false;
} }
LV2_Atom_Event* aev = (LV2_Atom_Event*)((uintptr_t)(
(char*)LV2_ATOM_CONTENTS(LV2_Atom_Sequence, aseq) + iter->offset));
aev->time.frames = samples;
aev->body.type = type;
aev->body.size = size;
memcpy(LV2_ATOM_BODY(&aev->body), data, size);
size = lv2_evbuf_pad_size(sizeof(LV2_Atom_Event) + size);
aseq->atom.size += size;
iter->offset += size;
return true; return true;
} }

View file

@ -25,21 +25,6 @@ extern "C" {
#include <stdbool.h> #include <stdbool.h>
#endif #endif
/**
Format of actual buffer.
*/
typedef enum {
/**
An (old) ev:EventBuffer (LV2_Event_Buffer).
*/
LV2_EVBUF_EVENT,
/**
A (new) atom:Sequence (LV2_Atom_Sequence).
*/
LV2_EVBUF_ATOM
} LV2_Evbuf_Type;
/** /**
An abstract/opaque LV2 event buffer. An abstract/opaque LV2 event buffer.
*/ */
@ -58,10 +43,9 @@ typedef struct {
URIDs for atom:Chunk and atom:Sequence must be passed for LV2_EVBUF_ATOM. URIDs for atom:Chunk and atom:Sequence must be passed for LV2_EVBUF_ATOM.
*/ */
LV2_Evbuf* LV2_Evbuf*
lv2_evbuf_new(uint32_t capacity, lv2_evbuf_new(uint32_t capacity,
LV2_Evbuf_Type type, uint32_t atom_Chunk,
uint32_t atom_Chunk, uint32_t atom_Sequence);
uint32_t atom_Sequence);
/** /**
Free an event buffer allocated with lv2_evbuf_new. Free an event buffer allocated with lv2_evbuf_new.
@ -69,13 +53,6 @@ lv2_evbuf_new(uint32_t capacity,
void void
lv2_evbuf_free(LV2_Evbuf* evbuf); lv2_evbuf_free(LV2_Evbuf* evbuf);
/**
Reset and change the type of an existing event buffer.
URIDs for atom:Chunk and atom:Sequence must be passed for LV2_EVBUF_ATOM.
*/
void
lv2_evbuf_set_type(LV2_Evbuf* evbuf, LV2_Evbuf_Type type);
/** /**
Clear and initialize an existing event buffer. Clear and initialize an existing event buffer.
The contents of buf are ignored entirely and overwritten, except capacity The contents of buf are ignored entirely and overwritten, except capacity

View file

@ -722,9 +722,6 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
flags |= PORT_CONTROL; flags |= PORT_CONTROL;
} else if (lilv_port_is_a(_impl->plugin, port, _world.lv2_AudioPort)) { } else if (lilv_port_is_a(_impl->plugin, port, _world.lv2_AudioPort)) {
flags |= PORT_AUDIO; flags |= PORT_AUDIO;
} else if (lilv_port_is_a(_impl->plugin, port, _world.ev_EventPort)) {
flags |= PORT_EVENT;
flags |= PORT_MIDI; // We assume old event API ports are for MIDI
} else if (lilv_port_is_a(_impl->plugin, port, _world.atom_AtomPort)) { } else if (lilv_port_is_a(_impl->plugin, port, _world.atom_AtomPort)) {
LilvNodes* buffer_types = lilv_port_get_value( LilvNodes* buffer_types = lilv_port_get_value(
_impl->plugin, port, _world.atom_bufferType); _impl->plugin, port, _world.atom_bufferType);
@ -2334,7 +2331,7 @@ LV2Plugin::describe_io_port (ARDOUR::DataType dt, bool input, uint32_t id) const
match = PORT_AUDIO; match = PORT_AUDIO;
break; break;
case DataType::MIDI: case DataType::MIDI:
match = PORT_SEQUENCE | PORT_MIDI; // ignore old PORT_EVENT match = PORT_SEQUENCE | PORT_MIDI;
break; break;
default: default:
return Plugin::IOPortDescription ("?"); return Plugin::IOPortDescription ("?");
@ -2594,8 +2591,9 @@ LV2Plugin::allocate_atom_event_buffers()
DEBUG_TRACE(DEBUG::LV2, string_compose("allocate %1 atom_ev_buffers of %2 bytes\n", total_atom_buffers, minimumSize)); DEBUG_TRACE(DEBUG::LV2, string_compose("allocate %1 atom_ev_buffers of %2 bytes\n", total_atom_buffers, minimumSize));
_atom_ev_buffers = (LV2_Evbuf**) malloc((total_atom_buffers + 1) * sizeof(LV2_Evbuf*)); _atom_ev_buffers = (LV2_Evbuf**) malloc((total_atom_buffers + 1) * sizeof(LV2_Evbuf*));
for (int i = 0; i < total_atom_buffers; ++i ) { for (int i = 0; i < total_atom_buffers; ++i ) {
_atom_ev_buffers[i] = lv2_evbuf_new(minimumSize, LV2_EVBUF_ATOM, _atom_ev_buffers[i] = lv2_evbuf_new(minimumSize,
_uri_map.urids.atom_Chunk, _uri_map.urids.atom_Sequence); _uri_map.urids.atom_Chunk,
_uri_map.urids.atom_Sequence);
} }
_atom_ev_buffers[total_atom_buffers] = 0; _atom_ev_buffers[total_atom_buffers] = 0;
return; return;
@ -2740,7 +2738,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
? bufs.get_audio(index).data(offset) ? bufs.get_audio(index).data(offset)
: scratch_bufs.get_audio(0).data(offset); : scratch_bufs.get_audio(0).data(offset);
} }
} else if (flags & (PORT_EVENT|PORT_SEQUENCE)) { } else if (flags & PORT_SEQUENCE) {
/* FIXME: The checks here for bufs.count().n_midi() > index shouldn't /* FIXME: The checks here for bufs.count().n_midi() > index shouldn't
be necessary, but the mapping is illegal in some cases. Ideally be necessary, but the mapping is illegal in some cases. Ideally
that should be fixed, but this is easier... that should be fixed, but this is easier...
@ -2759,7 +2757,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
*/ */
bufs.ensure_lv2_bufsize((flags & PORT_INPUT), index, _port_minimumSize[port_index]); bufs.ensure_lv2_bufsize((flags & PORT_INPUT), index, _port_minimumSize[port_index]);
_ev_buffers[port_index] = bufs.get_lv2_midi( _ev_buffers[port_index] = bufs.get_lv2_midi(
(flags & PORT_INPUT), index, (flags & PORT_EVENT)); (flags & PORT_INPUT), index);
} }
} else if ((flags & PORT_POSITION) && (flags & PORT_INPUT)) { } else if ((flags & PORT_POSITION) && (flags & PORT_INPUT)) {
lv2_evbuf_reset(_atom_ev_buffers[atom_port_index], true); lv2_evbuf_reset(_atom_ev_buffers[atom_port_index], true);
@ -2829,7 +2827,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
scratch_bufs.ensure_lv2_bufsize((flags & PORT_INPUT), scratch_bufs.ensure_lv2_bufsize((flags & PORT_INPUT),
0, _port_minimumSize[port_index]); 0, _port_minimumSize[port_index]);
_ev_buffers[port_index] = scratch_bufs.get_lv2_midi( _ev_buffers[port_index] = scratch_bufs.get_lv2_midi(
(flags & PORT_INPUT), 0, (flags & PORT_EVENT)); (flags & PORT_INPUT), 0);
} }
buf = lv2_evbuf_get_buffer(_ev_buffers[port_index]); buf = lv2_evbuf_get_buffer(_ev_buffers[port_index]);
@ -2911,7 +2909,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
* for quite a while at least ;) * for quite a while at least ;)
*/ */
// copy output of LV2 plugin's MIDI port to Ardour MIDI buffers -- MIDI OUT // copy output of LV2 plugin's MIDI port to Ardour MIDI buffers -- MIDI OUT
if ((flags & PORT_OUTPUT) && (flags & (PORT_EVENT|PORT_SEQUENCE|PORT_MIDI))) { if ((flags & PORT_OUTPUT) && (flags & (PORT_SEQUENCE|PORT_MIDI))) {
const uint32_t buf_index = out_map.get( const uint32_t buf_index = out_map.get(
DataType::MIDI, midi_out_index++, &valid); DataType::MIDI, midi_out_index++, &valid);
if (valid) { if (valid) {
@ -2919,7 +2917,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
} }
} }
// Flush MIDI (write back to Ardour MIDI buffers) -- MIDI THRU // Flush MIDI (write back to Ardour MIDI buffers) -- MIDI THRU
else if ((flags & PORT_OUTPUT) && (flags & (PORT_EVENT|PORT_SEQUENCE))) { else if ((flags & PORT_OUTPUT) && (flags & PORT_SEQUENCE)) {
const uint32_t buf_index = out_map.get( const uint32_t buf_index = out_map.get(
DataType::MIDI, midi_out_index++, &valid); DataType::MIDI, midi_out_index++, &valid);
if (valid) { if (valid) {
@ -2929,7 +2927,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
// Write messages to UI // Write messages to UI
if ((_to_ui || _can_write_automation || _patch_port_out_index != (uint32_t)-1) && if ((_to_ui || _can_write_automation || _patch_port_out_index != (uint32_t)-1) &&
(flags & PORT_OUTPUT) && (flags & (PORT_EVENT|PORT_SEQUENCE))) { (flags & PORT_OUTPUT) && (flags & PORT_SEQUENCE)) {
LV2_Evbuf* buf = _ev_buffers[port_index]; LV2_Evbuf* buf = _ev_buffers[port_index];
for (LV2_Evbuf_Iterator i = lv2_evbuf_begin(buf); for (LV2_Evbuf_Iterator i = lv2_evbuf_begin(buf);
lv2_evbuf_is_valid(i); lv2_evbuf_is_valid(i);
@ -3151,13 +3149,6 @@ LV2Plugin::parameter_is_audio(uint32_t param) const
return _port_flags[param] & PORT_AUDIO; return _port_flags[param] & PORT_AUDIO;
} }
bool
LV2Plugin::parameter_is_event(uint32_t param) const
{
assert(param < _port_flags.size());
return _port_flags[param] & PORT_EVENT;
}
bool bool
LV2Plugin::parameter_is_output(uint32_t param) const LV2Plugin::parameter_is_output(uint32_t param) const
{ {