diff options
author | Carl Hetherington <carl@carlh.net> | 2009-11-25 23:29:52 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2009-11-25 23:29:52 +0000 |
commit | 47b8fa21699e58f733f0ecb879193092f93c93d8 (patch) | |
tree | a47e1b89847432a89dba16f09cf8dc4700ee8d6f /libs/ardour/ardour | |
parent | fe59ade87415d72072009f1e77a892f9989819a0 (diff) |
Give Processor::run a new parameter to say whether or not the run method must leave
the passed-in buffers valid. In the case where the main outs delivery is the last
processor in a route, this is not necessary (and wasteful). If another processor
(e.g. a meter) follows the main outs, the passed-in (scratch) buffers must be valid
or the meter will get garbage data.
Fixes meters displaying phantom signals in some cases.
git-svn-id: svn://localhost/ardour2/branches/3.0@6180 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/amp.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/delivery.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/internal_return.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/internal_send.h | 2 | ||||
-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 | 5 | ||||
-rw-r--r-- | libs/ardour/ardour/return.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/send.h | 2 |
10 files changed, 13 insertions, 10 deletions
diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h index 724b1095a1..c237479abd 100644 --- a/libs/ardour/ardour/amp.h +++ b/libs/ardour/ardour/amp.h @@ -44,7 +44,7 @@ public: bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const; bool configure_io (ChanCount in, ChanCount out); - void run (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); 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 add222a0f1..1b1a217466 100644 --- a/libs/ardour/ardour/delivery.h +++ b/libs/ardour/ardour/delivery.h @@ -65,7 +65,7 @@ public: bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const; bool configure_io (ChanCount in, ChanCount out); - void run (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); /* supplemental method used with MIDI */ diff --git a/libs/ardour/ardour/internal_return.h b/libs/ardour/ardour/internal_return.h index dfd37a4de5..205559fe4e 100644 --- a/libs/ardour/ardour/internal_return.h +++ b/libs/ardour/ardour/internal_return.h @@ -40,7 +40,7 @@ class InternalReturn : public Return XMLNode& get_state(void); int set_state(const XMLNode&, int version); - void run (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); bool configure_io (ChanCount in, ChanCount out); bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const; void set_block_size (nframes_t); diff --git a/libs/ardour/ardour/internal_send.h b/libs/ardour/ardour/internal_send.h index 245a136dc8..ac184a69bf 100644 --- a/libs/ardour/ardour/internal_send.h +++ b/libs/ardour/ardour/internal_send.h @@ -40,7 +40,7 @@ class InternalSend : public Send XMLNode& get_state(void); int set_state(const XMLNode& node, int version); - void run (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); bool feeds (boost::shared_ptr<Route> other) const; bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const; bool configure_io (ChanCount in, ChanCount out); diff --git a/libs/ardour/ardour/meter.h b/libs/ardour/ardour/meter.h index 10272ee733..e0b956c0f9 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 (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); 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 348cda218e..593db1ff0d 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&, int version); - void run (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, bool); void silence (nframes_t nframes); void activate (); diff --git a/libs/ardour/ardour/port_insert.h b/libs/ardour/ardour/port_insert.h index 3283415e6d..f013a6a442 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&, int version); - void run (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); nframes_t signal_latency() const; diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index 3ec4a9885d..c57eb4354c 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -70,7 +70,10 @@ class Processor : public SessionObject, public AutomatableControls, public Laten virtual void set_block_size (nframes_t /*nframes*/) {} - virtual void run (BufferSet& /*bufs*/, sframes_t /*start_frame*/, sframes_t /*end_frame*/, nframes_t /*nframes*/) {} + /** @param result_required true if, on return from this method, bufs is required to contain valid data; + * if false, the method need not bother writing to bufs if it doesn't want to. + */ + virtual void run (BufferSet& /*bufs*/, sframes_t /*start_frame*/, sframes_t /*end_frame*/, nframes_t /*nframes*/, bool /*result_required*/) {} virtual void silence (nframes_t /*nframes*/) {} virtual void activate () { _pending_active = true; ActiveChanged(); } diff --git a/libs/ardour/ardour/return.h b/libs/ardour/ardour/return.h index b3212fe4a0..a3d3859899 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 (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); boost::shared_ptr<Amp> amp() const { return _amp; } boost::shared_ptr<PeakMeter> meter() const { return _meter; } diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h index b86d321bd2..78a82820df 100644 --- a/libs/ardour/ardour/send.h +++ b/libs/ardour/ardour/send.h @@ -57,7 +57,7 @@ class Send : public Delivery uint32_t pans_required() const { return _configured_input.n_audio(); } - void run (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); bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const; bool configure_io (ChanCount in, ChanCount out); |