MCP: send nothing if LedState is none in build_led(); return none from all transport button presses
git-svn-id: svn://localhost/ardour2/branches/3.0@11884 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -92,12 +92,16 @@ MidiByteArray MackieMidiBuilder::build_led (const Button & button, LedState ls)
|
||||
MidiByteArray MackieMidiBuilder::build_led (const Led & led, LedState ls)
|
||||
{
|
||||
MIDI::byte state = 0;
|
||||
switch (ls.state())
|
||||
{
|
||||
case LedState::on: state = 0x7f; break;
|
||||
case LedState::off: state = 0x00; break;
|
||||
case LedState::none: state = 0x00; break; // actually, this should never happen.
|
||||
case LedState::flashing: state = 0x01; break;
|
||||
|
||||
switch (ls.state()) {
|
||||
case LedState::on:
|
||||
state = 0x7f; break;
|
||||
case LedState::off:
|
||||
state = 0x00; break;
|
||||
case LedState::flashing:
|
||||
state = 0x01; break;
|
||||
case LedState::none:
|
||||
return MidiByteArray ();
|
||||
}
|
||||
|
||||
return MidiByteArray (3
|
||||
|
||||
@@ -479,65 +479,65 @@ LedState
|
||||
MackieControlProtocol::play_press (Button &)
|
||||
{
|
||||
transport_play ();
|
||||
return on;
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::play_release (Button &)
|
||||
{
|
||||
return session->transport_rolling();
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::record_press (Button &)
|
||||
{
|
||||
rec_enable_toggle ();
|
||||
return off;
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::record_release (Button &)
|
||||
{
|
||||
return off;
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::rewind_press (Button &)
|
||||
{
|
||||
rewind ();
|
||||
return off;
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::rewind_release (Button &)
|
||||
{
|
||||
return off;
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::ffwd_press (Button &)
|
||||
{
|
||||
ffwd ();
|
||||
return off;
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::ffwd_release (Button &)
|
||||
{
|
||||
return off;
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::loop_press (Button &)
|
||||
{
|
||||
session->request_play_loop (!session->get_play_loop());
|
||||
return off;
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::loop_release (Button &)
|
||||
{
|
||||
return off;
|
||||
return none;
|
||||
}
|
||||
|
||||
LedState
|
||||
|
||||
Reference in New Issue
Block a user