remove Pannable/PanShell from the Monitor bus

git-svn-id: svn://localhost/ardour2/branches/3.0@9720 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis
2011-06-13 15:52:31 +00:00
parent 961e25d90e
commit 37e9a53180
2 changed files with 57 additions and 24 deletions

View File

@@ -64,7 +64,10 @@ Delivery::Delivery (Session& s, boost::shared_ptr<IO> io, boost::shared_ptr<Pann
, no_panner_reset (false)
, scnt (0)
{
_panshell = boost::shared_ptr<PannerShell>(new PannerShell (_name, _session, pannable));
if (pannable) {
_panshell = boost::shared_ptr<PannerShell>(new PannerShell (_name, _session, pannable));
}
_display_to_user = false;
if (_output) {
@@ -86,7 +89,10 @@ Delivery::Delivery (Session& s, boost::shared_ptr<Pannable> pannable, boost::sha
, no_panner_reset (false)
, scnt (0)
{
_panshell = boost::shared_ptr<PannerShell>(new PannerShell (_name, _session, pannable));
if (pannable) {
_panshell = boost::shared_ptr<PannerShell>(new PannerShell (_name, _session, pannable));
}
_display_to_user = false;
if (_output) {
@@ -280,7 +286,9 @@ Delivery::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pf
Amp::apply_simple_gain (bufs, nframes, tgain);
}
panner = _panshell->panner();
if (_panshell) {
panner = _panshell->panner();
}
#if 0
if (_session.transport_rolling()) {
@@ -339,7 +347,10 @@ Delivery::state (bool full_state)
}
node.add_property("role", enum_2_string(_role));
node.add_child_nocopy (_panshell->state (full_state));
if (_panshell) {
node.add_child_nocopy (_panshell->state (full_state));
}
return node;
}
@@ -362,7 +373,7 @@ Delivery::set_state (const XMLNode& node, int version)
XMLNode* pan_node = node.child (X_("Panner"));
if (pan_node) {
if (pan_node && _panshell) {
_panshell->set_state (*pan_node, version);
}
@@ -390,11 +401,13 @@ Delivery::reset_panner ()
ntargets = _configured_output.n_audio();
}
_panshell->configure_io (ChanCount (DataType::AUDIO, pans_required()), ChanCount (DataType::AUDIO, ntargets));
if (_role == Main) {
_panshell->pannable()->set_panner (_panshell->panner());
}
if (_panshell) {
_panshell->configure_io (ChanCount (DataType::AUDIO, pans_required()), ChanCount (DataType::AUDIO, ntargets));
if (_role == Main) {
_panshell->pannable()->set_panner (_panshell->panner());
}
}
}
} else {
@@ -414,11 +427,13 @@ Delivery::panners_became_legal ()
ntargets = _configured_output.n_audio();
}
_panshell->configure_io (ChanCount (DataType::AUDIO, pans_required()), ChanCount (DataType::AUDIO, ntargets));
if (_role == Main) {
_panshell->pannable()->set_panner (_panshell->panner());
}
if (_panshell) {
_panshell->configure_io (ChanCount (DataType::AUDIO, pans_required()), ChanCount (DataType::AUDIO, ntargets));
if (_role == Main) {
_panshell->pannable()->set_panner (_panshell->panner());
}
}
panner_legal_c.disconnect ();
return 0;
@@ -468,7 +483,10 @@ void
Delivery::transport_stopped (framepos_t now)
{
Processor::transport_stopped (now);
_panshell->pannable()->transport_stopped (now);
if (_panshell) {
_panshell->pannable()->transport_stopped (now);
}
if (_output) {
PortSet& ports (_output->ports());
@@ -574,5 +592,9 @@ Delivery::output_changed (IOChange change, void* /*src*/)
boost::shared_ptr<Panner>
Delivery::panner () const
{
return _panshell->panner();
if (_panshell) {
return _panshell->panner();
} else {
return boost::shared_ptr<Panner>();
}
}

View File

@@ -125,11 +125,13 @@ Route::init ()
/* panning */
Pannable* p = new Pannable (_session);
if (!(_flags & Route::MonitorOut)) {
Pannable* p = new Pannable (_session);
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
boost_debug_shared_ptr_mark_interesting (p, "Pannable");
boost_debug_shared_ptr_mark_interesting (p, "Pannable");
#endif
_pannable.reset (p);
_pannable.reset (p);
}
/* input and output objects */
@@ -1843,7 +1845,9 @@ Route::state(bool full_state)
cmt->add_content (_comment);
}
node->add_child_nocopy (_pannable->state (full_state));
if (_pannable) {
node->add_child_nocopy (_pannable->state (full_state));
}
for (i = _processors.begin(); i != _processors.end(); ++i) {
node->add_child_nocopy((*i)->state (full_state));
@@ -1926,7 +1930,11 @@ Route::_set_state (const XMLNode& node, int version, bool /*call_base*/)
if (child->name() == X_("Pannable")) {
_pannable->set_state (*child, version);
if (_pannable) {
_pannable->set_state (*child, version);
} else {
warning << string_compose (_("Pannable state found for route (%1) without a panner!"), name()) << endmsg;
}
}
}
@@ -3064,7 +3072,10 @@ Route::set_latency_compensation (framecnt_t longest_session_latency)
void
Route::automation_snapshot (framepos_t now, bool force)
{
_pannable->automation_snapshot (now, force);
if (_pannable) {
_pannable->automation_snapshot (now, force);
}
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {
(*i)->automation_snapshot (now, force);
}
@@ -3204,7 +3215,7 @@ Route::shift (framepos_t pos, framecnt_t frames)
}
/* pan automation */
{
if (_pannable) {
ControlSet::Controls& c (_pannable->controls());
for (ControlSet::Controls::const_iterator ci = c.begin(); ci != c.end(); ++ci) {