Use FastScreenUpdate for UI message updating, and only if plugin has message output ports.
git-svn-id: svn://localhost/ardour2/branches/3.0@11521 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
c65b95f6d3
commit
1e6694f41a
@ -73,11 +73,10 @@ LV2PluginUI::write_to_ui(void* controller,
|
||||
port_index, buffer_size, format, buffer);
|
||||
}
|
||||
|
||||
bool
|
||||
void
|
||||
LV2PluginUI::update_timeout()
|
||||
{
|
||||
_lv2->emit_to_ui(this, &LV2PluginUI::write_to_ui);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
@ -267,8 +266,10 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -90,7 +90,7 @@ class LV2PluginUI : public PlugUIBase, public Gtk::VBox
|
||||
uint32_t format,
|
||||
const void* buffer);
|
||||
|
||||
bool update_timeout();
|
||||
void update_timeout();
|
||||
|
||||
void lv2ui_instantiate(const std::string& title);
|
||||
void lv2ui_free();
|
||||
|
@ -113,6 +113,7 @@ class LV2Plugin : public ARDOUR::Plugin
|
||||
std::string current_preset () const;
|
||||
|
||||
bool has_editor () const;
|
||||
bool has_message_output () const;
|
||||
|
||||
uint32_t atom_eventTransfer() const;
|
||||
|
||||
|
@ -763,6 +763,17 @@ LV2Plugin::has_editor() 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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user