X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fprocessor.h;h=bf9dfe0430945a1f80c3f3e740a3181b74daf8f2;hb=6698f5f686bef82b0c9568558c83a3b9b3344700;hp=7d126e8e0c60f0ce25ab398ec22b39880b92364b;hpb=05bcdd1d4c583c68ed977164913ff47e94df7adb;p=ardour.git diff --git a/libs/ardour/ardour/processor.h b/libs/ardour/ardour/processor.h index 7d126e8e0c..bf9dfe0430 100644 --- a/libs/ardour/ardour/processor.h +++ b/libs/ardour/ardour/processor.h @@ -33,7 +33,7 @@ #include #include #include - +#include class XMLNode; @@ -43,7 +43,7 @@ class Session; /* A mixer strip element - plugin, send, meter, etc. */ -class Processor : public Automatable +class Processor : public Automatable, public Latent { public: static const string state_node_name; @@ -66,13 +66,16 @@ class Processor : public Automatable bool get_next_ab_is_active () const { return _next_ab_is_active; } void set_next_ab_is_active (bool yn) { _next_ab_is_active = yn; } - virtual nframes_t latency() { return 0; } + virtual nframes_t signal_latency() const { return 0; } virtual void transport_stopped (nframes_t frame) {} virtual void set_block_size (nframes_t nframes) {} - virtual void run (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) = 0; + virtual void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) { assert(is_in_place()); } + + virtual void run_out_of_place (BufferSet& input, BufferSet& output, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset) { assert(is_out_of_place()); } + virtual void silence (nframes_t nframes, nframes_t offset) {} virtual void activate () { _active = true; ActiveChanged.emit(); } @@ -80,7 +83,15 @@ class Processor : public Automatable virtual bool configure_io (ChanCount in, ChanCount out) { _configured_input = in; return (_configured = true); } - /* Act as a pass through, if not overridden */ + /* 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_input_configuration (ChanCount in) const { return true; } virtual ChanCount output_for_input_configuration (ChanCount in) const { return in; } virtual ChanCount output_streams() const { return _configured_input; }