summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2009-11-30 23:16:28 +0000
committerCarl Hetherington <carl@carlh.net>2009-11-30 23:16:28 +0000
commitfddc11f556061d0ffa9a173a3652aa34c20bac3b (patch)
treea1e1fe82b7edf053effec3f8a3f561e99ce43a13 /gtk2_ardour
parent4497db3f1a9258561f7ec8a6a608bcda1594696d (diff)
Various optimisations to speed up rec-enable.
git-svn-id: svn://localhost/ardour2/branches/3.0@6227 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/audio_time_axis.cc2
-rw-r--r--gtk2_ardour/midi_time_axis.cc2
-rw-r--r--gtk2_ardour/mixer_strip.cc2
-rw-r--r--gtk2_ardour/port_matrix.cc13
-rw-r--r--gtk2_ardour/port_matrix.h2
-rw-r--r--gtk2_ardour/processor_box.cc14
-rw-r--r--gtk2_ardour/processor_box.h1
-rw-r--r--gtk2_ardour/route_params_ui.cc4
-rw-r--r--gtk2_ardour/route_params_ui.h2
-rw-r--r--gtk2_ardour/route_time_axis.cc8
-rw-r--r--gtk2_ardour/route_time_axis.h2
-rw-r--r--gtk2_ardour/route_ui.h2
12 files changed, 42 insertions, 12 deletions
diff --git a/gtk2_ardour/audio_time_axis.cc b/gtk2_ardour/audio_time_axis.cc
index 281bedafe1..e2a9dc80b8 100644
--- a/gtk2_ardour/audio_time_axis.cc
+++ b/gtk2_ardour/audio_time_axis.cc
@@ -115,7 +115,7 @@ AudioTimeAxisView::AudioTimeAxisView (PublicEditor& ed, Session& sess, boost::sh
/* map current state of the route */
- processors_changed ();
+ processors_changed (RouteProcessorChange ());
reset_processor_automation_curves ();
ensure_pan_views (false);
update_control_names ();
diff --git a/gtk2_ardour/midi_time_axis.cc b/gtk2_ardour/midi_time_axis.cc
index 544fee86a4..c05c3fecc6 100644
--- a/gtk2_ardour/midi_time_axis.cc
+++ b/gtk2_ardour/midi_time_axis.cc
@@ -132,7 +132,7 @@ MidiTimeAxisView::MidiTimeAxisView (PublicEditor& ed, Session& sess,
/* map current state of the route */
- processors_changed ();
+ processors_changed (RouteProcessorChange ());
ensure_xml_node ();
diff --git a/gtk2_ardour/mixer_strip.cc b/gtk2_ardour/mixer_strip.cc
index 5b26bd5141..73326c8d30 100644
--- a/gtk2_ardour/mixer_strip.cc
+++ b/gtk2_ardour/mixer_strip.cc
@@ -1609,6 +1609,7 @@ MixerStrip::engine_running ()
{
}
+/** Called when the metering point has changed */
void
MixerStrip::meter_changed (void *src)
{
@@ -1635,7 +1636,6 @@ MixerStrip::meter_changed (void *src)
gpm.setup_meters ();
// reset peak when meter point changes
gpm.reset_peak_display();
- set_width_enum (_width, this);
}
void
diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc
index ccf240f1bb..f36287836a 100644
--- a/gtk2_ardour/port_matrix.cc
+++ b/gtk2_ardour/port_matrix.cc
@@ -142,11 +142,22 @@ PortMatrix::reconnect_to_routes ()
boost::shared_ptr<RouteList> routes = _session.get_routes ();
for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) {
_route_connections.push_back (
- (*i)->processors_changed.connect (mem_fun (*this, &PortMatrix::setup_global_ports))
+ (*i)->processors_changed.connect (mem_fun (*this, &PortMatrix::route_processors_changed))
);
}
}
+void
+PortMatrix::route_processors_changed (RouteProcessorChange c)
+{
+ if (c.type == RouteProcessorChange::MeterPointChange) {
+ /* this change has no impact on the port matrix */
+ return;
+ }
+
+ setup_global_ports ();
+}
+
/** A route has been added to or removed from the session */
void
PortMatrix::routes_changed ()
diff --git a/gtk2_ardour/port_matrix.h b/gtk2_ardour/port_matrix.h
index d073740bf5..278b5a7ced 100644
--- a/gtk2_ardour/port_matrix.h
+++ b/gtk2_ardour/port_matrix.h
@@ -29,6 +29,7 @@
#include <gtkmm/notebook.h>
#include <boost/shared_ptr.hpp>
#include "ardour/bundle.h"
+#include "ardour/types.h"
#include "port_group.h"
#include "port_matrix_types.h"
#include "i18n.h"
@@ -178,6 +179,7 @@ private:
void remove_notebook_pages (Gtk::Notebook &);
void v_page_selected (GtkNotebookPage *, guint);
void h_page_selected (GtkNotebookPage *, guint);
+ void route_processors_changed (ARDOUR::RouteProcessorChange);
Gtk::Window* _parent;
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc
index 41a45880ae..1f2fe906c9 100644
--- a/gtk2_ardour/processor_box.cc
+++ b/gtk2_ardour/processor_box.cc
@@ -318,8 +318,7 @@ ProcessorBox::set_route (boost::shared_ptr<Route> r)
no_processor_redisplay = false;
_route = r;
- connections.push_back (_route->processors_changed.connect (
- mem_fun(*this, &ProcessorBox::redisplay_processors)));
+ connections.push_back (_route->processors_changed.connect (mem_fun (*this, &ProcessorBox::route_processors_changed)));
connections.push_back (_route->GoingAway.connect (
mem_fun (*this, &ProcessorBox::route_going_away)));
connections.push_back (_route->NameChanged.connect (
@@ -925,6 +924,17 @@ ProcessorBox::choose_aux (boost::weak_ptr<Route> wr)
}
void
+ProcessorBox::route_processors_changed (RouteProcessorChange c)
+{
+ if (c.type == RouteProcessorChange::MeterPointChange && c.meter_visibly_changed == false) {
+ /* the meter has moved, but it was and still is invisible to the user, so nothing to do */
+ return;
+ }
+
+ redisplay_processors ();
+}
+
+void
ProcessorBox::redisplay_processors ()
{
ENSURE_GUI_THREAD (mem_fun(*this, &ProcessorBox::redisplay_processors));
diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h
index 06a4753802..efc91c7a82 100644
--- a/gtk2_ardour/processor_box.h
+++ b/gtk2_ardour/processor_box.h
@@ -200,6 +200,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject
void redisplay_processors ();
void add_processor_to_display (boost::weak_ptr<ARDOUR::Processor>);
void reordered ();
+ void route_processors_changed (ARDOUR::RouteProcessorChange);
void remove_processor_gui (boost::shared_ptr<ARDOUR::Processor>);
diff --git a/gtk2_ardour/route_params_ui.cc b/gtk2_ardour/route_params_ui.cc
index 888e28aab0..d7037159dc 100644
--- a/gtk2_ardour/route_params_ui.cc
+++ b/gtk2_ardour/route_params_ui.cc
@@ -480,9 +480,9 @@ RouteParams_UI::route_selected()
}
void
-RouteParams_UI::processors_changed ()
+RouteParams_UI::processors_changed (RouteProcessorChange c)
{
- ENSURE_GUI_THREAD(mem_fun(*this, &RouteParams_UI::processors_changed));
+ ENSURE_GUI_THREAD (bind (mem_fun (*this, &RouteParams_UI::processors_changed), c));
cleanup_view();
_processor.reset ((Processor*) 0);
diff --git a/gtk2_ardour/route_params_ui.h b/gtk2_ardour/route_params_ui.h
index 4c79bb0829..4d21805778 100644
--- a/gtk2_ardour/route_params_ui.h
+++ b/gtk2_ardour/route_params_ui.h
@@ -174,7 +174,7 @@ class RouteParams_UI : public ArdourDialog
void cleanup_latency_frame ();
void setup_latency_frame ();
- void processors_changed ();
+ void processors_changed (ARDOUR::RouteProcessorChange);
void setup_processor_boxes();
void cleanup_processor_boxes();
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc
index ce693c2d29..08e9ac11ce 100644
--- a/gtk2_ardour/route_time_axis.cc
+++ b/gtk2_ardour/route_time_axis.cc
@@ -55,6 +55,7 @@
#include "ardour/route_group.h"
#include "ardour/session.h"
#include "ardour/session_playlist.h"
+#include "ardour/debug.h"
#include "ardour/utils.h"
#include "evoral/Parameter.hpp"
@@ -2118,8 +2119,13 @@ RouteTimeAxisView::processor_menu_item_toggled (RouteTimeAxisView::ProcessorAuto
}
void
-RouteTimeAxisView::processors_changed ()
+RouteTimeAxisView::processors_changed (RouteProcessorChange c)
{
+ if (c.type == RouteProcessorChange::MeterPointChange) {
+ /* nothing to do if only the meter point has changed */
+ return;
+ }
+
using namespace Menu_Helpers;
for (list<ProcessorAutomationInfo*>::iterator i = processor_automation.begin(); i != processor_automation.end(); ++i) {
diff --git a/gtk2_ardour/route_time_axis.h b/gtk2_ardour/route_time_axis.h
index 19715fe99d..f37f32b1fa 100644
--- a/gtk2_ardour/route_time_axis.h
+++ b/gtk2_ardour/route_time_axis.h
@@ -186,7 +186,7 @@ protected:
gint edit_click (GdkEventButton *);
- void processors_changed ();
+ void processors_changed (ARDOUR::RouteProcessorChange);
void add_processor_to_subplugin_menu (boost::weak_ptr<ARDOUR::Processor>);
void remove_processor_automation_node (ProcessorAutomationNode* pan);
diff --git a/gtk2_ardour/route_ui.h b/gtk2_ardour/route_ui.h
index ebc686b438..b62b146735 100644
--- a/gtk2_ardour/route_ui.h
+++ b/gtk2_ardour/route_ui.h
@@ -130,7 +130,7 @@ class RouteUI : public virtual AxisView
void solo_changed_so_update_mute ();
void mute_changed(void*);
void listen_changed(void*);
- virtual void processors_changed () {}
+ virtual void processors_changed (ARDOUR::RouteProcessorChange) {}
void route_rec_enable_changed();
void session_rec_enable_changed();