fix confusion about whether flip_mode in the Mackie support code is a bool or an enum
This commit is contained in:
parent
a5de2c1067
commit
41f6f5574b
@ -101,7 +101,7 @@ MackieControlProtocol::MackieControlProtocol (Session& session)
|
|||||||
, _gui (0)
|
, _gui (0)
|
||||||
, _zoom_mode (false)
|
, _zoom_mode (false)
|
||||||
, _scrub_mode (false)
|
, _scrub_mode (false)
|
||||||
, _flip_mode (false)
|
, _flip_mode (Normal)
|
||||||
, _view_mode (Mixer)
|
, _view_mode (Mixer)
|
||||||
, _current_selected_track (-1)
|
, _current_selected_track (-1)
|
||||||
, _modifier_state (0)
|
, _modifier_state (0)
|
||||||
@ -1271,11 +1271,11 @@ MackieControlProtocol::set_view_mode (ViewMode m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MackieControlProtocol::set_flip_mode (bool yn)
|
MackieControlProtocol::set_flip_mode (FlipMode fm)
|
||||||
{
|
{
|
||||||
Glib::Threads::Mutex::Lock lm (surfaces_lock);
|
Glib::Threads::Mutex::Lock lm (surfaces_lock);
|
||||||
|
|
||||||
_flip_mode = yn;
|
_flip_mode = fm;
|
||||||
|
|
||||||
for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
|
for (Surfaces::iterator s = surfaces.begin(); s != surfaces.end(); ++s) {
|
||||||
(*s)->update_flip_mode_display ();
|
(*s)->update_flip_mode_display ();
|
||||||
|
@ -123,13 +123,13 @@ class MackieControlProtocol
|
|||||||
void set_device (const std::string&, bool allow_activation = true);
|
void set_device (const std::string&, bool allow_activation = true);
|
||||||
void set_profile (const std::string&);
|
void set_profile (const std::string&);
|
||||||
|
|
||||||
bool flip_mode () const { return _flip_mode; }
|
FlipMode flip_mode () const { return _flip_mode; }
|
||||||
ViewMode view_mode () const { return _view_mode; }
|
ViewMode view_mode () const { return _view_mode; }
|
||||||
bool zoom_mode () const { return _zoom_mode; }
|
bool zoom_mode () const { return _zoom_mode; }
|
||||||
bool metering_active () const { return _metering_active; }
|
bool metering_active () const { return _metering_active; }
|
||||||
|
|
||||||
void set_view_mode (ViewMode);
|
void set_view_mode (ViewMode);
|
||||||
void set_flip_mode (bool);
|
void set_flip_mode (FlipMode);
|
||||||
|
|
||||||
XMLNode& get_state ();
|
XMLNode& get_state ();
|
||||||
int set_state (const XMLNode&, int version);
|
int set_state (const XMLNode&, int version);
|
||||||
@ -278,7 +278,7 @@ class MackieControlProtocol
|
|||||||
void* _gui;
|
void* _gui;
|
||||||
bool _zoom_mode;
|
bool _zoom_mode;
|
||||||
bool _scrub_mode;
|
bool _scrub_mode;
|
||||||
bool _flip_mode;
|
FlipMode _flip_mode;
|
||||||
ViewMode _view_mode;
|
ViewMode _view_mode;
|
||||||
int _current_selected_track;
|
int _current_selected_track;
|
||||||
int _modifier_state;
|
int _modifier_state;
|
||||||
|
@ -814,8 +814,12 @@ MackieControlProtocol::dyn_release (Button &)
|
|||||||
LedState
|
LedState
|
||||||
MackieControlProtocol::flip_press (Button &)
|
MackieControlProtocol::flip_press (Button &)
|
||||||
{
|
{
|
||||||
set_flip_mode (!_flip_mode);
|
if (_flip_mode != Normal) {
|
||||||
return (_flip_mode ? on : off);
|
set_flip_mode (Normal);
|
||||||
|
} else {
|
||||||
|
set_flip_mode (Mirror);
|
||||||
|
}
|
||||||
|
return ((_flip_mode != Normal) ? on : off);
|
||||||
}
|
}
|
||||||
LedState
|
LedState
|
||||||
MackieControlProtocol::flip_release (Button &)
|
MackieControlProtocol::flip_release (Button &)
|
||||||
|
@ -291,7 +291,7 @@ Strip::notify_gain_changed (bool force_update)
|
|||||||
|
|
||||||
Control* control;
|
Control* control;
|
||||||
|
|
||||||
if (_surface->mcp().flip_mode()) {
|
if (_surface->mcp().flip_mode() != Normal) {
|
||||||
control = _vpot;
|
control = _vpot;
|
||||||
} else {
|
} else {
|
||||||
control = _fader;
|
control = _fader;
|
||||||
@ -304,7 +304,7 @@ Strip::notify_gain_changed (bool force_update)
|
|||||||
|
|
||||||
if (force_update || normalized_position != _last_gain_position_written) {
|
if (force_update || normalized_position != _last_gain_position_written) {
|
||||||
|
|
||||||
if (_surface->mcp().flip_mode()) {
|
if (_surface->mcp().flip_mode() != Normal) {
|
||||||
if (!control->in_use()) {
|
if (!control->in_use()) {
|
||||||
_surface->write (_vpot->set (normalized_position, true, Pot::wrap));
|
_surface->write (_vpot->set (normalized_position, true, Pot::wrap));
|
||||||
}
|
}
|
||||||
@ -407,7 +407,7 @@ Strip::notify_panner_width_changed (bool force_update)
|
|||||||
|
|
||||||
if (force_update || pos != _last_pan_azi_position_written) {
|
if (force_update || pos != _last_pan_azi_position_written) {
|
||||||
|
|
||||||
if (_surface->mcp().flip_mode()) {
|
if (_surface->mcp().flip_mode() != Normal) {
|
||||||
|
|
||||||
if (control == _fader) {
|
if (control == _fader) {
|
||||||
if (!control->in_use()) {
|
if (!control->in_use()) {
|
||||||
@ -944,7 +944,7 @@ Strip::next_pot_mode ()
|
|||||||
{
|
{
|
||||||
vector<Evoral::Parameter>::iterator i;
|
vector<Evoral::Parameter>::iterator i;
|
||||||
|
|
||||||
if (_surface->mcp().flip_mode()) {
|
if (_surface->mcp().flip_mode() != Normal) {
|
||||||
/* do not change vpot mode while in flipped mode */
|
/* do not change vpot mode while in flipped mode */
|
||||||
DEBUG_TRACE (DEBUG::MackieControl, "not stepping pot mode - in flip mode\n");
|
DEBUG_TRACE (DEBUG::MackieControl, "not stepping pot mode - in flip mode\n");
|
||||||
_surface->write (display (1, "Flip"));
|
_surface->write (display (1, "Flip"));
|
||||||
@ -997,7 +997,7 @@ Strip::set_vpot_parameter (Evoral::Parameter p)
|
|||||||
case PanAzimuthAutomation:
|
case PanAzimuthAutomation:
|
||||||
pannable = _route->pannable ();
|
pannable = _route->pannable ();
|
||||||
if (pannable) {
|
if (pannable) {
|
||||||
if (_surface->mcp().flip_mode()) {
|
if (_surface->mcp().flip_mode() != Normal) {
|
||||||
/* gain to vpot, pan azi to fader */
|
/* gain to vpot, pan azi to fader */
|
||||||
_vpot->set_control (_route->gain_control());
|
_vpot->set_control (_route->gain_control());
|
||||||
control_by_parameter[GainAutomation] = _vpot;
|
control_by_parameter[GainAutomation] = _vpot;
|
||||||
@ -1025,7 +1025,7 @@ Strip::set_vpot_parameter (Evoral::Parameter p)
|
|||||||
case PanWidthAutomation:
|
case PanWidthAutomation:
|
||||||
pannable = _route->pannable ();
|
pannable = _route->pannable ();
|
||||||
if (pannable) {
|
if (pannable) {
|
||||||
if (_surface->mcp().flip_mode()) {
|
if (_surface->mcp().flip_mode() != Normal) {
|
||||||
/* gain to vpot, pan width to fader */
|
/* gain to vpot, pan width to fader */
|
||||||
_vpot->set_control (_route->gain_control());
|
_vpot->set_control (_route->gain_control());
|
||||||
control_by_parameter[GainAutomation] = _vpot;
|
control_by_parameter[GainAutomation] = _vpot;
|
||||||
|
Loading…
Reference in New Issue
Block a user