13
0

MCP: check on whether we using pan width control

git-svn-id: svn://localhost/ardour2/branches/3.0@11930 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-04-12 00:50:18 +00:00
parent cf6d8b0e67
commit ac284a4ea1
4 changed files with 22 additions and 4 deletions

View File

@ -1098,6 +1098,16 @@ MackieControlProtocol::set_view_mode (ViewMode m)
}
void
MackieControlProtocol::set_flip_mode (FlipMode m)
{
_flip_mode = m;
for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
(*s)->update_flip_mode_display ();
}
}
void
MackieControlProtocol::set_master_on_surface_strip (uint32_t surface, uint32_t strip_number)
{
@ -1127,3 +1137,4 @@ MackieControlProtocol::force_special_route_to_strip (boost::shared_ptr<Route> r,
}
}
}

View File

@ -118,6 +118,7 @@ class MackieControlProtocol
ViewMode view_mode () const { return _view_mode; }
void set_view_mode (ViewMode);
void set_flip_mode (FlipMode);
XMLNode& get_state ();
int set_state (const XMLNode&, int version);

View File

@ -819,16 +819,20 @@ MackieControlProtocol::dyn_release (Button &)
LedState
MackieControlProtocol::flip_press (Button &)
{
FlipMode m;
if (_modifier_state == 0) {
if (_flip_mode != Normal) {
_flip_mode = Normal;
m = Normal;
} else {
_flip_mode = Swap;
m = Swap;
}
} else if (_modifier_state & MODIFIER_CONTROL) {
_flip_mode = Zero;
m = Zero;
}
set_flip_mode (m);
return (_flip_mode != Normal ? on : off);
}
LedState

View File

@ -474,12 +474,14 @@ Strip::handle_pot (Pot& pot, float delta)
case MackieControlProtocol::Mirror: /* pot + fader control pan */
case MackieControlProtocol::Zero: /* pot controls pan, faders don't move */
if (_surface->mcp().modifier_state() & MackieControlProtocol::MODIFIER_CONTROL) {
DEBUG_TRACE (DEBUG::MackieControl, "pot using control to alter width\n");
ac = pannable->pan_width_control;
} else {
DEBUG_TRACE (DEBUG::MackieControl, "pot using control to alter position\n");
ac = pannable->pan_azimuth_control;
}
break;
case MackieControlProtocol::Swap:
case MackieControlProtocol::Swap: /* pot controls gain */
ac = _route->gain_control();
break;
}