mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
make monitor section an optional feature than can be added/removed as needed. this is a big commit, and breakage is possible. it has been moderately tested. this commit also locks the remote control ID of the master bus to 318 and the monitor section (if any) to 319. the numbers are based on MIDI Machine Control limits
git-svn-id: svn://localhost/ardour2/branches/3.0@11256 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
4b95a7912a
commit
508c5eb5bd
16 changed files with 409 additions and 218 deletions
|
|
@ -260,6 +260,13 @@ SessionOptionEditor::SessionOptionEditor (Session* s)
|
|||
sigc::mem_fun (*_session_config, &SessionConfiguration::set_auto_input)
|
||||
));
|
||||
|
||||
add_option (_("Monitoring"), new BoolOption (
|
||||
"have-monitor-section",
|
||||
_("Use monitor section in this session"),
|
||||
sigc::mem_fun (*this, &SessionOptionEditor::get_use_monitor_section),
|
||||
sigc::mem_fun (*this, &SessionOptionEditor::set_use_monitor_section)
|
||||
));
|
||||
|
||||
/* Misc */
|
||||
|
||||
add_option (_("Misc"), new OptionEditorHeading (_("MIDI Options")));
|
||||
|
|
@ -341,3 +348,27 @@ SessionOptionEditor::parameter_changed (std::string const & p)
|
|||
_sync_source->set_sensitive (!_session->config.get_external_sync ());
|
||||
}
|
||||
}
|
||||
|
||||
/* the presence of absence of a monitor section is not really a regular session
|
||||
* property so we provide these two functions to act as setter/getter slots
|
||||
*/
|
||||
|
||||
bool
|
||||
SessionOptionEditor::set_use_monitor_section (bool yn)
|
||||
{
|
||||
bool had_monitor_section = _session->monitor_out();
|
||||
|
||||
if (yn) {
|
||||
_session->add_monitor_section ();
|
||||
} else {
|
||||
_session->remove_monitor_section ();
|
||||
}
|
||||
|
||||
return had_monitor_section != yn;
|
||||
}
|
||||
|
||||
bool
|
||||
SessionOptionEditor::get_use_monitor_section ()
|
||||
{
|
||||
return _session->monitor_out() != 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue