fix solo/listen issues when reloadign a session, caused by that last commit

git-svn-id: svn://localhost/ardour2/branches/3.0@6937 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-04-19 17:48:11 +00:00
parent 1ceee92bb5
commit 2cb5595b11
5 changed files with 34 additions and 14 deletions

View File

@ -439,6 +439,7 @@ class Route : public SessionObject, public AutomatableControls, public RouteGrou
void set_self_solo (bool yn);
void set_delivery_solo ();
void markup_solo_ignore ();
};
} // namespace ARDOUR

View File

@ -521,6 +521,7 @@ Delivery::target_gain ()
}
if (!_solo_isolated && _session.soloing()) {
desired_gain = min (Config->get_solo_mute_gain(), _mute_master->mute_gain_at (mp));
} else {

View File

@ -1085,9 +1085,7 @@ IO::set_name (const string& requested_name)
/* replace all colons in the name. i wish we didn't have to do this */
if (replace_all (name, ":", "-")) {
warning << _("you cannot use colons to name objects with I/O connections") << endmsg;
}
replace_all (name, ":", "-");
for (PortSet::iterator i = _ports.begin(); i != _ports.end(); ++i) {
string current_name = i->name();

View File

@ -161,6 +161,8 @@ Route::init ()
_main_outs->panner()->set_bypassed (true);
}
markup_solo_ignore ();
/* now that we have _meter, its safe to connect to this */
Metering::Meter.connect_same_thread (*this, (boost::bind (&Route::meter, this)));
@ -808,14 +810,6 @@ Route::add_processor (boost::shared_ptr<Processor> processor, ProcessorList::ite
}
/* all delivery processors on master, monitor and auditioner never ever pay attention to solo
*/
boost::shared_ptr<Delivery> d = boost::dynamic_pointer_cast<Delivery>(processor);
if (d && (is_master() || is_monitor() || is_hidden())) {
d->set_solo_ignored (true);
}
/* is this the monitor send ? if so, make sure we keep track of it */
boost::shared_ptr<InternalSend> isend = boost::dynamic_pointer_cast<InternalSend> (processor);
@ -2243,9 +2237,30 @@ Route::set_processor_state (const XMLNode& node)
}
}
markup_solo_ignore ();
processors_changed (RouteProcessorChange ());
}
void
Route::markup_solo_ignore ()
{
Glib::RWLock::ReaderLock lm (_processor_lock);
for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p) {
/* all delivery processors on master, monitor and auditioner never ever pay attention to solo
*/
boost::shared_ptr<Delivery> d = boost::dynamic_pointer_cast<Delivery>(*p);
if (d && (is_master() || is_monitor() || is_hidden())) {
cerr << _name << " Found a delivery unit, mark solo ignored\n";
d->set_solo_ignored (true);
}
}
}
void
Route::curve_reallocate ()
{
@ -2374,8 +2389,6 @@ Route::listen_via (boost::shared_ptr<Route> route, Placement placement, bool /*a
} else {
listener.reset (new InternalSend (_session, _mute_master, route, (aux ? Delivery::Aux : Delivery::Listen)));
if (route == _session.monitor_out()) {
}
}
} catch (failed_constructor& err) {

View File

@ -323,6 +323,8 @@ Session::butler_transport_work ()
}
g_atomic_int_dec_and_test (&_butler->should_do_transport_work);
DEBUG_TRACE (DEBUG::Transport, X_("Butler transport work all done\n"));
}
void
@ -432,6 +434,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
_have_captured = true;
}
DEBUG_TRACE (DEBUG::Transport, X_("Butler PTW: DS stop\n"));
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
(*i)->transport_stopped (*now, xnow, abort);
}
@ -467,7 +470,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
if ((auto_return_enabled || synced_to_jack() || _requested_return_frame >= 0) &&
!(ptw & PostTransportLocate)) {
/* no explicit locate queued */
/* no explicit locate queued */
bool do_locate = false;
@ -538,10 +541,14 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
/* this for() block can be put inside the previous if() and has the effect of ... ??? what */
DEBUG_TRACE (DEBUG::Transport, X_("Butler PTW: locate\n"));
for (DiskstreamList::iterator i = dsl->begin(); i != dsl->end(); ++i) {
if (!(*i)->hidden()) {
DEBUG_TRACE (DEBUG::Transport, string_compose ("Butler PTW: locate on %1\n", (*i)->name()));
(*i)->non_realtime_locate (_transport_frame);
}
if (on_entry != g_atomic_int_get (&_butler->should_do_transport_work)) {
finished = false;
/* we will be back */