X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Froute.cc;h=e64f21636c55331e60d7497ede1bf4118fd45643;hb=20dc91d0adf8bc54acb1bdb7fe6e368255d75e56;hp=81d85a8640d7035c878a47ee82aaf97f3dcd1fcf;hpb=cd17e05e3a22614387050736c89a4727c4da0d61;p=ardour.git diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 81d85a8640..e64f21636c 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -570,6 +570,11 @@ Route::set_listen (bool yn, void* src) return; } + if (_route_group && src != _route_group && _route_group->is_active() && _route_group->is_solo()) { + _route_group->foreach_route (boost::bind (&Route::set_listen, _1, yn, _route_group)); + return; + } + if (_monitor_send) { if (yn != _monitor_send->active()) { if (yn) { @@ -821,7 +826,7 @@ dump_processors(const string& name, const list >& p cerr << name << " {" << endl; for (list >::const_iterator p = procs.begin(); p != procs.end(); ++p) { - cerr << "\t" << (*p)->name() << " ID = " << (*p)->id() << endl; + cerr << "\t" << (*p)->name() << " ID = " << (*p)->id() << " @ " << (*p) << endl; } cerr << "}" << endl; } @@ -909,7 +914,7 @@ Route::add_processor (boost::shared_ptr processor, ProcessorList::ite if ((pi = boost::dynamic_pointer_cast(processor)) != 0) { - if (pi->natural_input_streams() == ChanCount::ZERO) { + if (pi->has_no_inputs ()) { /* generator plugin */ _have_internal_generator = true; } @@ -965,6 +970,7 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version) if (prop->value() == "ladspa" || prop->value() == "Ladspa" || prop->value() == "lv2" || prop->value() == "vst" || + prop->value() == "lxvst" || prop->value() == "audiounit") { processor.reset (new PluginInsert (_session)); @@ -1062,7 +1068,7 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr boost::shared_ptr pi; if ((pi = boost::dynamic_pointer_cast(*i)) != 0) { - if (pi->is_generator()) { + if (pi->has_no_inputs ()) { _have_internal_generator = true; break; } @@ -1361,7 +1367,7 @@ Route::remove_processor (boost::shared_ptr processor, ProcessorStream boost::shared_ptr pi; if ((pi = boost::dynamic_pointer_cast(*i)) != 0) { - if (pi->is_generator()) { + if (pi->has_no_inputs ()) { _have_internal_generator = true; break; } @@ -1451,7 +1457,7 @@ Route::remove_processors (const ProcessorList& to_be_deleted, ProcessorStreams* boost::shared_ptr pi; if ((pi = boost::dynamic_pointer_cast(*i)) != 0) { - if (pi->is_generator()) { + if (pi->has_no_inputs ()) { _have_internal_generator = true; break; } @@ -1583,7 +1589,8 @@ Route::configure_processors_unlocked (ProcessorStreams* err) } /* make sure we have sufficient scratch buffers to cope with the new processor - configuration */ + configuration + */ _session.ensure_buffers (n_process_buffers ()); DEBUG_TRACE (DEBUG::Processors, string_compose ("%1: configuration complete\n", _name)); @@ -2376,6 +2383,7 @@ Route::set_processor_state (const XMLNode& node) } else if (prop->value() == "ladspa" || prop->value() == "Ladspa" || prop->value() == "lv2" || prop->value() == "vst" || + prop->value() == "lxvst" || prop->value() == "audiounit") { processor.reset (new PluginInsert(_session)); @@ -2432,7 +2440,7 @@ Route::set_processor_state (const XMLNode& node) boost::shared_ptr pi; if ((pi = boost::dynamic_pointer_cast(*i)) != 0) { - if (pi->is_generator()) { + if (pi->has_no_inputs ()) { _have_internal_generator = true; break; } @@ -2757,7 +2765,7 @@ Route::pans_required () const int Route::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, - bool session_state_changing, bool /*can_record*/, bool /*rec_monitors_input*/) + bool session_state_changing, bool /*can_record*/) { Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK); if (!lm.locked()) { @@ -2793,45 +2801,9 @@ Route::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, return 0; } -framecnt_t -Route::check_initial_delay (framecnt_t nframes, framecnt_t& transport_frame) -{ - if (_roll_delay > nframes) { - - _roll_delay -= nframes; - silence_unlocked (nframes); - /* transport frame is not legal for caller to use */ - return 0; - - } else if (_roll_delay > 0) { - - nframes -= _roll_delay; - silence_unlocked (_roll_delay); - transport_frame += _roll_delay; - - /* shuffle all the port buffers for things that lead "out" of this Route - to reflect that we just wrote _roll_delay frames of silence. - */ - - Glib::RWLock::ReaderLock lm (_processor_lock); - for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { - boost::shared_ptr iop = boost::dynamic_pointer_cast (*i); - if (iop) { - iop->increment_port_buffer_offset (_roll_delay); - } - } - _output->increment_port_buffer_offset (_roll_delay); - - _roll_delay = 0; - - } - - return nframes; -} - int Route::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, int declick, - bool /*can_record*/, bool /*rec_monitors_input*/, bool& /* need_butler */) + bool /*can_record*/, bool& /* need_butler */) { Glib::RWLock::ReaderLock lm (_processor_lock, Glib::TRY_LOCK); if (!lm.locked()) { @@ -2864,7 +2836,7 @@ Route::roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame, in int Route::silent_roll (pframes_t nframes, framepos_t /*start_frame*/, framepos_t /*end_frame*/, - bool /*can_record*/, bool /*rec_monitors_input*/, bool& /* need_butler */) + bool /*can_record*/, bool& /* need_butler */) { silence (nframes); return 0;