Fix real-time violation, only send UI updates if explicitly requested by UI.
git-svn-id: svn://localhost/ardour2/branches/3.0@11522 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
1e6694f41a
commit
66f9f3061f
|
@ -267,6 +267,7 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
}
|
||||
|
||||
if (_lv2->has_message_output()) {
|
||||
_lv2->enable_ui_emmission();
|
||||
ARDOUR_UI::instance()->RapidScreenUpdate.connect(
|
||||
sigc::mem_fun(*this, &LV2PluginUI::update_timeout));
|
||||
}
|
||||
|
|
|
@ -125,6 +125,7 @@ class LV2Plugin : public ARDOUR::Plugin
|
|||
uint32_t format,
|
||||
const void* buffer);
|
||||
|
||||
void enable_ui_emmission();
|
||||
void emit_to_ui(void* controller, UIMessageSink sink);
|
||||
|
||||
static URIMap _uri_map;
|
||||
|
|
|
@ -819,12 +819,16 @@ LV2Plugin::write_to_ui(uint32_t index,
|
|||
uint32_t protocol,
|
||||
uint32_t size,
|
||||
uint8_t* body)
|
||||
{
|
||||
write_to(_to_ui, index, protocol, size, body);
|
||||
}
|
||||
|
||||
void
|
||||
LV2Plugin::enable_ui_emmission()
|
||||
{
|
||||
if (!_to_ui) {
|
||||
_to_ui = new RingBuffer<uint8_t>(4096);
|
||||
}
|
||||
|
||||
write_to(_to_ui, index, protocol, size, body);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1156,7 +1160,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
|
|||
}
|
||||
|
||||
// Write messages to UI
|
||||
if ((flags & PORT_OUTPUT) && (flags & PORT_MESSAGE)) {
|
||||
if (_to_ui && (flags & PORT_OUTPUT) && (flags & PORT_MESSAGE)) {
|
||||
LV2_Evbuf* buf = _ev_buffers[port_index];
|
||||
for (LV2_Evbuf_Iterator i = lv2_evbuf_begin(buf);
|
||||
lv2_evbuf_is_valid(i);
|
||||
|
|
Loading…
Reference in New Issue
Block a user