mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
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
2 changed files with 9 additions and 7 deletions
|
|
@ -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));
|
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
|
route_table.clear ();
|
||||||
for (vector<boost::shared_ptr<Route> >::iterator i = route_table.begin(); i != route_table.end(); ++i) {
|
set_route_table_size (surface().strips.size());
|
||||||
i->reset ();
|
|
||||||
}
|
|
||||||
|
|
||||||
// link routes to strips
|
// link routes to strips
|
||||||
uint32_t i = 0;
|
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.
|
// Don't instantiate a MidiByteArray here unless it's needed for exceptions.
|
||||||
// Reason being that this method is called for every single incoming
|
// 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
|
// converts midi messages into control_event signals
|
||||||
// it might be worth combining this with lookup_control
|
// it might be worth combining this with lookup_control
|
||||||
// because they have similar logic flows.
|
// 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);
|
MidiByteArray bytes (count, raw_bytes);
|
||||||
DEBUG_TRACE (DEBUG::MackieControl, string_compose ("MackiePort::handle_midi_any %1\n", 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
|
try
|
||||||
{
|
{
|
||||||
// ignore sysex messages
|
// ignore sysex messages
|
||||||
if (raw_bytes[0] == MIDI::sysex) return;
|
if (raw_bytes[0] == MIDI::sysex) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// sanity checking
|
// sanity checking
|
||||||
if (count != 3) {
|
if (count != 3) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue