diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-08-02 12:51:24 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-08-02 12:51:24 -0400 |
commit | aaabaf5d3c8624f398809bb468e2b121a23abda0 (patch) | |
tree | 96c53dcea66d0731e4090c9b252253eacf2436fb /gtk2_ardour | |
parent | c98fcb62fb7daf5f52098dfe5ad4e68e71ddfe70 (diff) | |
parent | 94f366190e044462bd907de2d96f0d34b275b080 (diff) |
Merge branch 'master' into windows
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/midi_tracer.cc | 5 | ||||
-rw-r--r-- | gtk2_ardour/port_matrix.cc | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/gtk2_ardour/midi_tracer.cc b/gtk2_ardour/midi_tracer.cc index e447c59f3b..e0deb6dce8 100644 --- a/gtk2_ardour/midi_tracer.cc +++ b/gtk2_ardour/midi_tracer.cc @@ -303,7 +303,12 @@ MidiTracer::tracer (Parser&, byte* msg, size_t len) s += snprintf ( &buf[s], bufsize, " MTC full frame to %02d:%02d:%02d:%02d\n", msg[5] & 0x1f, msg[6], msg[7], msg[8] ); + } else if (len == 3 && msg[0] == MIDI::position) { + /* MIDI Song Position */ + uint16_t midi_beats = (uint16_t) msg[1]; + midi_beats |= msg[2]; + s += snprintf (&buf[s], bufsize, "%16s %d\n", "Position", (int) midi_beats); } else { /* other sys-ex */ diff --git a/gtk2_ardour/port_matrix.cc b/gtk2_ardour/port_matrix.cc index d406b8ed01..5c21d7ff25 100644 --- a/gtk2_ardour/port_matrix.cc +++ b/gtk2_ardour/port_matrix.cc @@ -152,6 +152,7 @@ PortMatrix::init () /* and also bundles */ _session->BundleAdded.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports, this), gui_context()); + _session->BundleRemoved.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports, this), gui_context()); /* and also ports */ _session->engine().PortRegisteredOrUnregistered.connect (_session_connections, invalidator (*this), boost::bind (&PortMatrix::setup_global_ports, this), gui_context()); @@ -180,6 +181,7 @@ PortMatrix::reconnect_to_routes () boost::shared_ptr<RouteList> routes = _session->get_routes (); for (RouteList::iterator i = routes->begin(); i != routes->end(); ++i) { (*i)->processors_changed.connect (_route_connections, invalidator (*this), boost::bind (&PortMatrix::route_processors_changed, this, _1), gui_context()); + (*i)->DropReferences.connect (_route_connections, invalidator (*this), boost::bind (&PortMatrix::routes_changed, this), gui_context()); } } @@ -198,6 +200,7 @@ PortMatrix::route_processors_changed (RouteProcessorChange c) void PortMatrix::routes_changed () { + if (!_session) return; reconnect_to_routes (); setup_global_ports (); } @@ -206,7 +209,10 @@ PortMatrix::routes_changed () void PortMatrix::setup () { - if (!_session) return; // session went away + if (!_session) { + _route_connections.drop_connections (); + return; // session went away + } /* this needs to be done first, as the visible_ports() method uses the notebook state to decide which ports are being shown */ |