summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-04-11 03:24:20 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-04-11 03:24:20 +0000
commitdbd6ae23d061718fd072e15519559311454a626d (patch)
tree748f7a93a6218b836fafc4f747755156691016d0 /libs
parent0b69a2d3e1ebd73b2a6a80633ce37457d6086805 (diff)
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
Diffstat (limited to 'libs')
-rw-r--r--libs/surfaces/mackie/mackie_midi_builder.cc16
-rw-r--r--libs/surfaces/mackie/mcp_buttons.cc20
2 files changed, 20 insertions, 16 deletions
diff --git a/libs/surfaces/mackie/mackie_midi_builder.cc b/libs/surfaces/mackie/mackie_midi_builder.cc
index 53528b2459..beee395333 100644
--- a/libs/surfaces/mackie/mackie_midi_builder.cc
+++ b/libs/surfaces/mackie/mackie_midi_builder.cc
@@ -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
diff --git a/libs/surfaces/mackie/mcp_buttons.cc b/libs/surfaces/mackie/mcp_buttons.cc
index 09848577f6..9e2dd4637c 100644
--- a/libs/surfaces/mackie/mcp_buttons.cc
+++ b/libs/surfaces/mackie/mcp_buttons.cc
@@ -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