adds MCP button to toggle between master fader and monitor fader
Adds an MCP button function to switch the master fader on the controller between the session master fader and (if enabled) monitor fader.
This commit is contained in:
parent
b6a1144472
commit
b846356f87
@ -511,6 +511,8 @@ class MackieControlProtocol
|
||||
Mackie::LedState view_release (Mackie::Button&);
|
||||
|
||||
Mackie::LedState bank_release (Mackie::Button&, uint32_t bank_num);
|
||||
Mackie::LedState master_press(Mackie::Button &);
|
||||
Mackie::LedState master_release(Mackie::Button &);
|
||||
Mackie::LedState redo_press(Mackie::Button &);
|
||||
Mackie::LedState redo_release(Mackie::Button &);
|
||||
Mackie::LedState prev_marker_press(Mackie::Button &);
|
||||
|
@ -560,6 +560,19 @@ MackieControlProtocol::flip_window_release (Button &)
|
||||
return off;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::master_press (Button &)
|
||||
{
|
||||
_master_surface->toggle_master_monitor ();
|
||||
return on;
|
||||
}
|
||||
|
||||
LedState
|
||||
MackieControlProtocol::master_release (Button &)
|
||||
{
|
||||
return off;
|
||||
}
|
||||
|
||||
/////////////////////////////////////
|
||||
// Transport Buttons
|
||||
/////////////////////////////////////
|
||||
|
@ -410,6 +410,33 @@ Surface::master_monitor_may_have_changed ()
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Surface::master_stripable_is_master_monitor ()
|
||||
{
|
||||
if (_master_stripable == _mcp.get_session().monitor_out())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void
|
||||
Surface::toggle_master_monitor ()
|
||||
{
|
||||
if(master_stripable_is_master_monitor())
|
||||
{
|
||||
_master_stripable = _mcp.get_session().master_out();
|
||||
} else if (_mcp.get_session().monitor_out() != 0)
|
||||
{
|
||||
_master_stripable = _mcp.get_session().monitor_out();
|
||||
} else { return; }
|
||||
|
||||
_master_fader->set_control (_master_stripable->gain_control());
|
||||
_master_stripable->gain_control()->Changed.connect (master_connection, MISSING_INVALIDATOR, boost::bind (&Surface::master_gain_changed, this), ui_context());
|
||||
_last_master_gain_written = FLT_MAX;
|
||||
master_gain_changed ();
|
||||
}
|
||||
|
||||
void
|
||||
Surface::setup_master ()
|
||||
{
|
||||
|
@ -198,6 +198,9 @@ public:
|
||||
|
||||
bool get_qcon_flag() { return is_qcon; }
|
||||
|
||||
void toggle_master_monitor ();
|
||||
bool master_stripable_is_master_monitor ();
|
||||
|
||||
private:
|
||||
MackieControlProtocol& _mcp;
|
||||
SurfacePort* _port;
|
||||
|
Loading…
Reference in New Issue
Block a user