diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-18 01:30:44 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-01-18 01:30:44 +0000 |
commit | 508c5eb5bd7e31d721c3a29fc734aab3a44aa8a9 (patch) | |
tree | 4937d96a3f4d366d4722c6225da147599b97a955 /libs/ardour/session_state.cc | |
parent | 4b95a7912aa27b13c4715b9580ec1bb10dbfd7c3 (diff) |
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
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index 33768e1ce8..893f94831b 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -225,6 +225,7 @@ Session::first_stage_init (string fullpath, string snapshot_name) no_questions_about_missing_files = false; _speakers.reset (new Speakers); _clicks_cleared = 0; + ignore_route_processor_changes = false; AudioDiskstream::allocate_working_buffers(); @@ -570,7 +571,6 @@ Session::create (const string& session_template, BusProfile* bus_profile) if (bus_profile) { RouteList rl; - int control_id = 1; ChanCount count(DataType::AUDIO, bus_profile->master_out_channels); if (bus_profile->master_out_channels) { @@ -586,28 +586,9 @@ Session::create (const string& session_template, BusProfile* bus_profile) r->input()->ensure_io (count, false, this); r->output()->ensure_io (count, false, this); } - r->set_remote_control_id (control_id++); rl.push_back (r); - if (Config->get_use_monitor_bus()) { - boost::shared_ptr<Route> r (new Route (*this, _("monitor"), Route::MonitorOut, DataType::AUDIO)); - if (r->init ()) { - return -1; - } -#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS - // boost_debug_shared_ptr_mark_interesting (r.get(), "Route"); -#endif - { - Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ()); - r->input()->ensure_io (count, false, this); - r->output()->ensure_io (count, false, this); - } - r->set_remote_control_id (control_id); - - rl.push_back (r); - } - } else { /* prohibit auto-connect to master, because there isn't one */ bus_profile->output_ac = AutoConnectOption (bus_profile->output_ac & ~AutoConnectMaster); @@ -629,6 +610,10 @@ Session::create (const string& session_template, BusProfile* bus_profile) Config->set_output_auto_connect (bus_profile->output_ac); } + if (Config->get_use_monitor_bus() && bus_profile) { + add_monitor_section (); + } + save_state (""); return 0; |