port_index, buffer_size, format, buffer);
}
-bool
+void
LV2PluginUI::update_timeout()
{
_lv2->emit_to_ui(this, &LV2PluginUI::write_to_ui);
- return true;
}
void
}
}
- Glib::signal_timeout().connect(
- sigc::mem_fun(*this, &LV2PluginUI::update_timeout), 500);
+ if (_lv2->has_message_output()) {
+ ARDOUR_UI::instance()->RapidScreenUpdate.connect(
+ sigc::mem_fun(*this, &LV2PluginUI::update_timeout));
+ }
}
void
std::string current_preset () const;
bool has_editor () const;
+ bool has_message_output () const;
uint32_t atom_eventTransfer() const;
return _impl->ui != NULL;
}
+bool
+LV2Plugin::has_message_output() const
+{
+ for (uint32_t i = 0; i < num_ports(); ++i) {
+ if ((_port_flags[i] & PORT_MESSAGE) && _port_flags[i] & PORT_OUTPUT) {
+ return true;
+ }
+ }
+ return false;
+}
+
uint32_t
LV2Plugin::atom_eventTransfer() const
{