summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/send.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-09-20 20:25:04 +0200
committerRobin Gareus <robin@gareus.org>2019-09-20 21:27:16 +0200
commite8822e76d605cd49e758225081bcef339de58224 (patch)
tree7bd6880b7a80203092a1c9543a2887eb3c4ea039 /libs/ardour/ardour/send.h
parent361727716f873d1642adb9c5dfc7b882bd599b1f (diff)
Add abstract API for latency compensated sends
This is in preparation for MixbusSends that are not derived from Delivery : IOProcessor.
Diffstat (limited to 'libs/ardour/ardour/send.h')
-rw-r--r--libs/ardour/ardour/send.h35
1 files changed, 28 insertions, 7 deletions
diff --git a/libs/ardour/ardour/send.h b/libs/ardour/ardour/send.h
index 94e0070bbd..e711e68685 100644
--- a/libs/ardour/ardour/send.h
+++ b/libs/ardour/ardour/send.h
@@ -37,7 +37,32 @@ class Amp;
class GainControl;
class DelayLine;
-class LIBARDOUR_API Send : public Delivery
+/** Internal Abstraction for Sends (and MixbusSends) */
+class LIBARDOUR_API LatentSend
+{
+public:
+ LatentSend ();
+ virtual ~LatentSend() {}
+
+ samplecnt_t get_delay_in () const { return _delay_in; }
+ samplecnt_t get_delay_out () const { return _delay_out; }
+
+ /* should only be called by Route::update_signal_latency */
+ virtual void set_delay_in (samplecnt_t) = 0;
+
+ /* should only be called by InternalReturn::set_playback_offset
+ * (via Route::update_signal_latency)
+ */
+ virtual void set_delay_out (samplecnt_t, size_t bus = 0) = 0;
+
+ static PBD::Signal0<void> ChangedLatency;
+
+protected:
+ samplecnt_t _delay_in;
+ samplecnt_t _delay_out;
+};
+
+class LIBARDOUR_API Send : public Delivery, public LatentSend
{
public:
Send (Session&, boost::shared_ptr<Pannable> pannable, boost::shared_ptr<MuteMaster>, Delivery::Role r = Delivery::Send, bool ignore_bitslot = false);
@@ -69,14 +94,12 @@ public:
bool configure_io (ChanCount in, ChanCount out);
/* latency compensation */
- void set_delay_in (samplecnt_t); // should only be called by Route::update_signal_latency
- void set_delay_out (samplecnt_t); // should only be called by InternalReturn::set_playback_offset (via Route::update_signal_latency)
+ void set_delay_in (samplecnt_t);
+ void set_delay_out (samplecnt_t, size_t bus = 0);
samplecnt_t get_delay_in () const { return _delay_in; }
samplecnt_t get_delay_out () const { return _delay_out; }
samplecnt_t signal_latency () const;
- static PBD::Signal0<void> ChangedLatency;
-
void activate ();
void deactivate ();
@@ -106,8 +129,6 @@ private:
int set_state_2X (XMLNode const &, int);
uint32_t _bitslot;
- samplecnt_t _delay_in;
- samplecnt_t _delay_out;
bool _remove_on_disconnect;
};