diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2009-06-10 18:10:07 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2009-06-10 18:10:07 +0000 |
commit | 6e9b9294e1e7a22f31eabbafa39cee5844b3449a (patch) | |
tree | 67285ddc9b3cb0fa656ed711cc7d78cff35075d9 /libs | |
parent | ff26317d4f7904c071d7ecfb96fd84e71728f6d0 (diff) |
nick m's fix for markers etc ; several tweaks for mute/solo ; rename run_in_place() as run()
git-svn-id: svn://localhost/ardour2/branches/3.0@5155 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/amp.cc | 21 | ||||
-rw-r--r-- | libs/ardour/ardour/amp.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/delivery.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/io_processor.h | 1 | ||||
-rw-r--r-- | libs/ardour/ardour/meter.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/plugin_insert.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/port_insert.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/processor.h | 16 | ||||
-rw-r--r-- | libs/ardour/ardour/return.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/route.h | 6 | ||||
-rw-r--r-- | libs/ardour/ardour/send.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/session.h | 3 | ||||
-rw-r--r-- | libs/ardour/audio_track.cc | 2 | ||||
-rw-r--r-- | libs/ardour/delivery.cc | 8 | ||||
-rw-r--r-- | libs/ardour/enums.cc | 2 | ||||
-rw-r--r-- | libs/ardour/io.cc | 2 | ||||
-rw-r--r-- | libs/ardour/meter.cc | 2 | ||||
-rw-r--r-- | libs/ardour/mute_master.cc | 13 | ||||
-rw-r--r-- | libs/ardour/plugin_insert.cc | 2 | ||||
-rw-r--r-- | libs/ardour/port_insert.cc | 4 | ||||
-rw-r--r-- | libs/ardour/return.cc | 6 | ||||
-rw-r--r-- | libs/ardour/route.cc | 34 | ||||
-rw-r--r-- | libs/ardour/send.cc | 8 | ||||
-rw-r--r-- | libs/ardour/session.cc | 80 | ||||
-rw-r--r-- | libs/ardour/session_state.cc | 1 |
25 files changed, 92 insertions, 133 deletions
diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc index 755dc8b821..154d909560 100644 --- a/libs/ardour/amp.cc +++ b/libs/ardour/amp.cc @@ -16,6 +16,7 @@ 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <iostream> #include <cstring> #include <cmath> #include <algorithm> @@ -64,7 +65,7 @@ Amp::configure_io (ChanCount in, ChanCount out) } void -Amp::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) +Amp::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) { gain_t mute_gain; @@ -137,25 +138,15 @@ Amp::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, Amp::apply_gain (bufs, nframes, _current_gain, dg); _current_gain = dg; - } else if ((_current_gain != 0.0f) && (_current_gain != 1.0f)) { + } else if (_current_gain != 1.0f) { - /* gain has not changed, but its non-unity, so apply it unless - its zero. + /* gain has not changed, but its non-unity */ for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - Sample* const sp = i->data(); - apply_gain_to_buffer(sp, nframes, _current_gain); + apply_gain_to_buffer (i->data(), nframes, _current_gain); } - - } else if (_current_gain == 0.0f) { - - /* silence! */ - - for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { - i->clear(); - } - } + } } } } diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h index 03cc3d02f7..f758ca4de8 100644 --- a/libs/ardour/ardour/amp.h +++ b/libs/ardour/ardour/amp.h @@ -40,7 +40,7 @@ public: bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const; bool configure_io (ChanCount in, ChanCount out); - void run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); + void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); bool apply_gain() const { return _apply_gain; } void apply_gain(bool yn) { _apply_gain = yn; } diff --git a/libs/ardour/ardour/delivery.h b/libs/ardour/ardour/delivery.h index 645b601251..c875f23fcc 100644 --- a/libs/ardour/ardour/delivery.h +++ b/libs/ardour/ardour/delivery.h @@ -50,7 +50,7 @@ public: bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const; bool configure_io (ChanCount in, ChanCount out); - void run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); + void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); /* supplemental method use with MIDI */ diff --git a/libs/ardour/ardour/io_processor.h b/libs/ardour/ardour/io_processor.h index 72be2c0743..14d88d6b44 100644 --- a/libs/ardour/ardour/io_processor.h +++ b/libs/ardour/ardour/io_processor.h @@ -64,7 +64,6 @@ class IOProcessor : public Processor void set_input (boost::shared_ptr<IO>); void set_output (boost::shared_ptr<IO>); - void run_in_place (BufferSet& in, sframes_t start, sframes_t end, nframes_t nframes) = 0; void silence (nframes_t nframes); sigc::signal<void,IOProcessor*,bool> AutomationPlaybackChanged; diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h index 43df5e936c..57afcc39ca 100644 --- a/libs/ardour/ardour/meter.h +++ b/libs/ardour/ardour/meter.h @@ -61,7 +61,7 @@ public: bool configure_io (ChanCount in, ChanCount out); /** Compute peaks */ - void run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); + void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); float peak_power (uint32_t n) { if (n < _visible_peak_power.size()) { diff --git a/libs/ardour/ardour/plugin_insert.h b/libs/ardour/ardour/plugin_insert.h index 01cf9bedfd..2908803aab 100644 --- a/libs/ardour/ardour/plugin_insert.h +++ b/libs/ardour/ardour/plugin_insert.h @@ -54,7 +54,7 @@ class PluginInsert : public Processor XMLNode& get_state(void); int set_state(const XMLNode&); - void run_in_place (BufferSet& in, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); + void run (BufferSet& in, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); void silence (nframes_t nframes); void activate (); diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h index fa9c31efe6..7447c5b3e8 100644 --- a/libs/ardour/ardour/port_insert.h +++ b/libs/ardour/ardour/port_insert.h @@ -51,7 +51,7 @@ class PortInsert : public IOProcessor XMLNode& get_state(void); int set_state(const XMLNode&); - void run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); + void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); nframes_t signal_latency() const; diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index 61a266e9c5..06fcb81ce7 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -76,14 +76,7 @@ class Processor : public SessionObject, public AutomatableControls, public Laten virtual void set_block_size (nframes_t nframes) {} - virtual void run_in_place (BufferSet& bufs, - sframes_t start_frame, sframes_t end_frame, - nframes_t nframes) { assert(is_in_place()); } - - virtual void run_out_of_place (BufferSet& input, BufferSet& output, - sframes_t start_frame, sframes_t end_frame, - nframes_t nframes) { assert(is_out_of_place()); } - + virtual void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) {} virtual void silence (nframes_t nframes) {} void activate () { _active = true; ActiveChanged(); } @@ -93,13 +86,6 @@ class Processor : public SessionObject, public AutomatableControls, public Laten /* Derived classes should override these, or processor appears as an in-place pass-through */ - /** In-place processors implement run_in_place and modify thee input buffer parameter */ - virtual bool is_in_place () const { return true; } - - /* Out-Of-Place processors implement run_out_of_place, don't modify the input parameter - * and write to their output parameter */ - virtual bool is_out_of_place () const { return false; } - virtual bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const = 0; virtual ChanCount input_streams () const { return _configured_input; } virtual ChanCount output_streams() const { return _configured_output; } diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h index 5c2a82e3aa..3f75cc57b7 100644 --- a/libs/ardour/ardour/return.h +++ b/libs/ardour/ardour/return.h @@ -44,7 +44,7 @@ public: uint32_t bit_slot() const { return _bitslot; } - void run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); + void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); boost::shared_ptr<Amp> amp() const { return _amp; } boost::shared_ptr<PeakMeter> meter() const { return _meter; } diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h index a2ad716592..2a3580b187 100644 --- a/libs/ardour/ardour/route.h +++ b/libs/ardour/ardour/route.h @@ -129,10 +129,10 @@ class Route : public SessionObject, public AutomatableControls void set_solo_isolated (bool yn, void *src); bool solo_isolated() const; - void set_phase_invert (bool yn, void* src); + void set_phase_invert (bool yn); bool phase_invert() const; - void set_denormal_protection (bool yn, void* src); + void set_denormal_protection (bool yn); bool denormal_protection() const; void set_edit_group (RouteGroup *, void *); @@ -226,6 +226,8 @@ class Route : public SessionObject, public AutomatableControls nframes_t initial_delay() const { return _initial_delay; } sigc::signal<void> active_changed; + sigc::signal<void> phase_invert_changed; + sigc::signal<void> denormal_protection_changed; sigc::signal<void,void*> solo_changed; sigc::signal<void,void*> solo_safe_changed; sigc::signal<void,void*> solo_isolated_changed; diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index 302f512c9c..3a0eae21e5 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -55,7 +55,7 @@ class Send : public Delivery uint32_t pans_required() const { return _configured_input.n_audio(); } - void run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); + void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes); bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const; diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 614ab42eeb..2e161ff776 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -1466,13 +1466,12 @@ class Session : public PBD::StatefulDestructible, public boost::noncopyable /* mixer stuff */ bool solo_update_disabled; - bool currently_soloing; void route_mute_changed (void *src); void route_solo_changed (void *src, boost::weak_ptr<Route>); void catch_up_on_solo (); void catch_up_on_solo_mute_override (); - void update_route_solo_state (); + void update_route_solo_state (boost::shared_ptr<RouteList> r = boost::shared_ptr<RouteList>()); void modify_solo_mute (bool, bool); void strip_portname_for_solo (std::string& portname); diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index a41fdbe6b6..1db1147205 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -667,7 +667,7 @@ AudioTrack::export_stuff (BufferSet& buffers, sframes_t start, nframes_t nframes for (i = _processors.begin(); i != _processors.end(); ++i) { boost::shared_ptr<Processor> processor; if ((processor = boost::dynamic_pointer_cast<Processor>(*i)) != 0) { - processor->run_in_place (buffers, start, start+nframes, nframes); + processor->run (buffers, start, start+nframes, nframes); } } diff --git a/libs/ardour/delivery.cc b/libs/ardour/delivery.cc index 4d79aad2b9..0a49a47a7f 100644 --- a/libs/ardour/delivery.cc +++ b/libs/ardour/delivery.cc @@ -142,18 +142,22 @@ Delivery::configure_io (ChanCount in, ChanCount out) } void -Delivery::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) +Delivery::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) { if (_output->n_ports ().get (_output->default_type()) == 0) { return; } + /* this setup is not just for our purposes, but for anything that comes after us in the + processing pathway that wants to use this->output_buffers() for some reason. + */ + PortSet& ports (_output->ports()); output_buffers().attach_buffers (ports, nframes, _output_offset); // this Delivery processor is not a derived type, and thus we assume // we really can modify the buffers passed in (it is almost certainly - // the main output stage of a Route). Contrast with Send::run_in_place() + // the main output stage of a Route). Contrast with Send::run() // which cannot do this. gain_t tgain = target_gain (); diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 1d0f811aea..6e98fdf5a7 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -509,7 +509,7 @@ setup_enum_writer () REGISTER_CLASS_ENUM (MuteMaster, PostFader); REGISTER_CLASS_ENUM (MuteMaster, Listen); REGISTER_CLASS_ENUM (MuteMaster, Main); - REGISTER (_MuteMaster_MutePoint); + REGISTER_BITS (_MuteMaster_MutePoint); REGISTER_CLASS_ENUM (IO, Input); REGISTER_CLASS_ENUM (IO, Output); diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 014c005677..302a4cdfdb 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -1280,7 +1280,7 @@ IO::process_input (boost::shared_ptr<Processor> proc, sframes_t start_frame, sfr /* don't read the data into new buffers - just use the port buffers directly */ bufs.attach_buffers (_ports, nframes, 0); - proc->run_in_place (bufs, start_frame, end_frame, nframes); + proc->run (bufs, start_frame, end_frame, nframes); } void diff --git a/libs/ardour/meter.cc b/libs/ardour/meter.cc index ed50479c74..0675e14cef 100644 --- a/libs/ardour/meter.cc +++ b/libs/ardour/meter.cc @@ -71,7 +71,7 @@ Metering::update_meters() * be set to 0. */ void -PeakMeter::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) +PeakMeter::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) { const uint32_t n_audio = min(_configured_input.n_audio(), bufs.count().n_audio()); const uint32_t n_midi = min(_configured_input.n_midi(), bufs.count().n_midi()); diff --git a/libs/ardour/mute_master.cc b/libs/ardour/mute_master.cc index bbf1036dd4..db4b6ca178 100644 --- a/libs/ardour/mute_master.cc +++ b/libs/ardour/mute_master.cc @@ -17,7 +17,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include <iostream> + +#include "pbd/enumwriter.h" #include "ardour/mute_master.h" #include "ardour/rc_configuration.h" @@ -104,11 +105,19 @@ MuteMaster::get_value () const int MuteMaster::set_state (const XMLNode& node) { + const XMLProperty* prop; + + if ((prop = node.property ("mute-point")) != 0) { + _mute_point = (MutePoint) string_2_enum (prop->value(), _mute_point); + } + return 0; } XMLNode& MuteMaster::get_state() { - return *(new XMLNode (X_("MuteMaster"))); + XMLNode* node = new XMLNode (X_("MuteMaster")); + node->add_property ("mute-point", enum_2_string (_mute_point)); + return *node; } diff --git a/libs/ardour/plugin_insert.cc b/libs/ardour/plugin_insert.cc index b2b3f4af91..bf8f007104 100644 --- a/libs/ardour/plugin_insert.cc +++ b/libs/ardour/plugin_insert.cc @@ -371,7 +371,7 @@ PluginInsert::silence (nframes_t nframes) } void -PluginInsert::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) +PluginInsert::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) { if (active()) { diff --git a/libs/ardour/port_insert.cc b/libs/ardour/port_insert.cc index 8ff2633771..ffddc681c7 100644 --- a/libs/ardour/port_insert.cc +++ b/libs/ardour/port_insert.cc @@ -66,7 +66,7 @@ PortInsert::~PortInsert () } void -PortInsert::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) +PortInsert::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) { if (_output->n_ports().n_total() == 0) { return; @@ -78,7 +78,7 @@ PortInsert::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_ return; } - _out->run_in_place (bufs, start_frame, end_frame, nframes); + _out->run (bufs, start_frame, end_frame, nframes); _input->collect_input (bufs, nframes, ChanCount::ZERO); } diff --git a/libs/ardour/return.cc b/libs/ardour/return.cc index 4942f9023b..574b6736a0 100644 --- a/libs/ardour/return.cc +++ b/libs/ardour/return.cc @@ -119,7 +119,7 @@ Return::set_state(const XMLNode& node) } void -Return::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) +Return::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) { if (!active() || _input->n_ports() == ChanCount::ZERO) { return; @@ -131,13 +131,13 @@ Return::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_fram // Can't automate gain for sends or returns yet because we need different buffers // so that we don't overwrite the main automation data for the route amp // _amp->setup_gain_automation (start_frame, end_frame, nframes); - _amp->run_in_place (bufs, start_frame, end_frame, nframes); + _amp->run (bufs, start_frame, end_frame, nframes); if (_metering) { if (_amp->gain_control()->get_value() == 0) { _meter->reset(); } else { - _meter->run_in_place (bufs, start_frame, end_frame, nframes); + _meter->run (bufs, start_frame, end_frame, nframes); } } } diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index dd0c8579ff..e7d68c4884 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -383,6 +383,19 @@ Route::process_output_buffers (BufferSet& bufs, } } } + + } else { + + if (_denormal_protection || Config->get_denormal_protection()) { + + for (BufferSet::audio_iterator i = bufs.audio_begin(); i != bufs.audio_end(); ++i) { + Sample* const sp = i->data(); + for (nframes_t nx = 0; nx < nframes; ++nx) { + sp[nx] += 1.0e-27f; + } + } + + } } /* ------------------------------------------------------------------------------------------- @@ -394,7 +407,7 @@ Route::process_output_buffers (BufferSet& bufs, if (rm.locked()) { for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) { bufs.set_count (ChanCount::max(bufs.count(), (*i)->input_streams())); - (*i)->run_in_place (bufs, start_frame, end_frame, nframes); + (*i)->run (bufs, start_frame, end_frame, nframes); bufs.set_count (ChanCount::max(bufs.count(), (*i)->output_streams())); } @@ -1471,11 +1484,11 @@ Route::_set_state (const XMLNode& node, bool call_base) } if ((prop = node.property (X_("phase-invert"))) != 0) { - set_phase_invert (prop->value()=="yes"?true:false, this); + set_phase_invert (prop->value()=="yes"?true:false); } if ((prop = node.property (X_("denormal-protection"))) != 0) { - set_denormal_protection (prop->value()=="yes"?true:false, this); + set_denormal_protection (prop->value()=="yes"?true:false); } if ((prop = node.property (X_("active"))) != 0) { @@ -1589,7 +1602,10 @@ Route::_set_state (const XMLNode& node, bool call_base) sscanf (prop->value().c_str(), "%d", &x); set_remote_control_id (x); } - } + + } else if (child->name() == X_("MuteMaster")) { + _mute_master->set_state (*child); + } } if ((prop = node.property (X_("mix-group"))) != 0) { @@ -2414,11 +2430,11 @@ Route::send_for (boost::shared_ptr<const IO> target) const } void -Route::set_phase_invert (bool yn, void *src) +Route::set_phase_invert (bool yn) { if (_phase_invert != yn) { - _phase_invert = yn; - // phase_invert_changed (src); /* EMIT SIGNAL */ + _phase_invert = 0xffff; // XXX all channels + phase_invert_changed (); /* EMIT SIGNAL */ } } @@ -2429,11 +2445,11 @@ Route::phase_invert () const } void -Route::set_denormal_protection (bool yn, void *src) +Route::set_denormal_protection (bool yn) { if (_denormal_protection != yn) { _denormal_protection = yn; - // denormal_protection_changed (src); /* EMIT SIGNAL */ + denormal_protection_changed (); /* EMIT SIGNAL */ } } diff --git a/libs/ardour/send.cc b/libs/ardour/send.cc index 61c235e60a..ad66f73796 100644 --- a/libs/ardour/send.cc +++ b/libs/ardour/send.cc @@ -66,7 +66,7 @@ Send::~Send () } void -Send::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) +Send::run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes) { if (!_active || _output->n_ports() == ChanCount::ZERO) { _meter->reset (); @@ -85,11 +85,11 @@ Send::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, // Can't automate gain for sends or returns yet because we need different buffers // so that we don't overwrite the main automation data for the route amp // _amp->setup_gain_automation (start_frame, end_frame, nframes); - _amp->run_in_place (sendbufs, start_frame, end_frame, nframes); + _amp->run (sendbufs, start_frame, end_frame, nframes); /* deliver to outputs */ - Delivery::run_in_place (sendbufs, start_frame, end_frame, nframes); + Delivery::run (sendbufs, start_frame, end_frame, nframes); /* consider metering */ @@ -97,7 +97,7 @@ Send::run_in_place (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, if (_amp->gain_control()->get_value() == 0) { _meter->reset(); } else { - _meter->run_in_place (*_output_buffers, start_frame, end_frame, nframes); + _meter->run (*_output_buffers, start_frame, end_frame, nframes); } } } diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 54bada345a..394193e8b2 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -1889,7 +1889,7 @@ Session::new_audio_route (int input_channels, int output_channels, uint32_t how_ try { shared_ptr<Route> bus (new Route (*this, bus_name, Route::Flag(0), DataType::AUDIO)); - if (bus->output()->ensure_io (ChanCount(DataType::AUDIO, input_channels), false, this)) { + if (bus->input()->ensure_io (ChanCount(DataType::AUDIO, input_channels), false, this)) { error << string_compose (_("cannot configure %1 in/%2 out configuration for new audio track"), input_channels, output_channels) << endmsg; @@ -1904,22 +1904,17 @@ Session::new_audio_route (int input_channels, int output_channels, uint32_t how_ goto failure; } - - - /* - for (uint32_t x = 0; n_physical_audio_inputs && x < bus->n_inputs(); ++x) { - + for (uint32_t x = 0; n_physical_audio_inputs && x < bus->input()->n_ports().n_audio(); ++x) { port = ""; if (Config->get_input_auto_connect() & AutoConnectPhysical) { port = physinputs[((n+x)%n_physical_audio_inputs)]; } - if (port.length() && bus->connect_input (bus->input (x), port, this)) { + if (port.length() && bus->input()->connect (bus->input()->nth (x), port, this)) { break; } } - */ for (uint32_t x = 0; n_physical_audio_outputs && x < bus->n_outputs().n_audio(); ++x) { port = ""; @@ -2218,8 +2213,6 @@ Session::route_mute_changed (void* src) void Session::route_solo_changed (void* src, boost::weak_ptr<Route> wpr) { - cerr << "RSC sud = " << solo_update_disabled << endl; - if (solo_update_disabled) { // We know already return; @@ -2242,16 +2235,13 @@ Session::route_solo_changed (void* src, boost::weak_ptr<Route> wpr) delta = -1; } - cerr << "\tshift solo level by " << delta << endl; - + solo_update_disabled = true; for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { if ((*i)->feeds (route->input())) { /* do it */ - solo_update_disabled = true; (*i)->main_outs()->mod_solo_level (delta); - solo_update_disabled = false; } } @@ -2261,72 +2251,36 @@ Session::route_solo_changed (void* src, boost::weak_ptr<Route> wpr) _master_out->main_outs()->mod_solo_level (1); } - /* now figure out if anything that matters is soloed */ - - bool something_soloed = false; - - for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if (!(*i)->is_master() && !(*i)->is_hidden() && (*i)->soloed()) { - something_soloed = true; - break; - } - } - - if (something_soloed != _non_soloed_outs_muted) { - _non_soloed_outs_muted = something_soloed; - SoloActive (_non_soloed_outs_muted); /* EMIT SIGNAL */ - } - + solo_update_disabled = false; + update_route_solo_state (r); SoloChanged (); /* EMIT SIGNAL */ - set_dirty(); } void -Session::update_route_solo_state () +Session::update_route_solo_state (boost::shared_ptr<RouteList> r) { - bool mute = false; - bool is_track = false; - bool signal = false; + /* now figure out if anything that matters is soloed */ - /* this is where we actually implement solo by changing - the solo mute setting of each track. - */ + bool something_soloed = false; - shared_ptr<RouteList> r = routes.reader (); + if (!r) { + r = routes.reader(); + } for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { - if ((*i)->soloed()) { - mute = true; - if (boost::dynamic_pointer_cast<Track>(*i)) { - is_track = true; - } + if (!(*i)->is_master() && !(*i)->is_hidden() && (*i)->soloed()) { + something_soloed = true; break; } } - if (mute != currently_soloing) { - signal = true; - currently_soloing = mute; - } - - if (!is_track && !mute) { - - /* nothing is soloed */ - - if (signal) { - SoloActive (false); - } - - return; - } - - if (signal) { - SoloActive (currently_soloing); + if (something_soloed != _non_soloed_outs_muted) { + _non_soloed_outs_muted = something_soloed; + SoloActive (_non_soloed_outs_muted); /* EMIT SIGNAL */ } } - void Session::catch_up_on_solo () { diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index fff8803b5a..955da881d1 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -179,7 +179,6 @@ Session::first_stage_init (string fullpath, string snapshot_name) next_quarter_frame_to_send = -1; current_block_size = 0; solo_update_disabled = false; - currently_soloing = false; _have_captured = false; _worst_output_latency = 0; _worst_input_latency = 0; |