MCP: alternative method for clearing route table when switching banks
git-svn-id: svn://localhost/ardour2/branches/3.0@11822 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
d1d164092b
commit
f703a3cfd1
@ -285,10 +285,8 @@ MackieControlProtocol::switch_banks (int initial)
|
||||
|
||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("switch to %1, %2\n", _current_initial_bank, end_pos));
|
||||
|
||||
// clear out routes from our table in case any have been deleted
|
||||
for (vector<boost::shared_ptr<Route> >::iterator i = route_table.begin(); i != route_table.end(); ++i) {
|
||||
i->reset ();
|
||||
}
|
||||
route_table.clear ();
|
||||
set_route_table_size (surface().strips.size());
|
||||
|
||||
// link routes to strips
|
||||
uint32_t i = 0;
|
||||
|
@ -314,7 +314,8 @@ void MackiePort::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size
|
||||
}
|
||||
}
|
||||
|
||||
Control & MackiePort::lookup_control (MIDI::byte * bytes, size_t count)
|
||||
Control&
|
||||
MackiePort::lookup_control (MIDI::byte * bytes, size_t count)
|
||||
{
|
||||
// Don't instantiate a MidiByteArray here unless it's needed for exceptions.
|
||||
// Reason being that this method is called for every single incoming
|
||||
@ -375,7 +376,8 @@ Control & MackiePort::lookup_control (MIDI::byte * bytes, size_t count)
|
||||
// converts midi messages into control_event signals
|
||||
// it might be worth combining this with lookup_control
|
||||
// because they have similar logic flows.
|
||||
void MackiePort::handle_midi_any (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count)
|
||||
void
|
||||
MackiePort::handle_midi_any (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count)
|
||||
{
|
||||
MidiByteArray bytes (count, raw_bytes);
|
||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("MackiePort::handle_midi_any %1\n", bytes));
|
||||
@ -383,7 +385,9 @@ void MackiePort::handle_midi_any (MIDI::Parser &, MIDI::byte * raw_bytes, size_t
|
||||
try
|
||||
{
|
||||
// ignore sysex messages
|
||||
if (raw_bytes[0] == MIDI::sysex) return;
|
||||
if (raw_bytes[0] == MIDI::sysex) {
|
||||
return;
|
||||
}
|
||||
|
||||
// sanity checking
|
||||
if (count != 3) {
|
||||
|
Loading…
Reference in New Issue
Block a user