diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-07 19:06:42 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-03-07 19:06:42 +0000 |
commit | 665f3bea5a7b145636b6d85bb3623013e38f1819 (patch) | |
tree | 56c8e8d1436eef6a4fd8134a89d73d3d5648c0d4 /libs/ardour/ardour/port.h | |
parent | 61cbf95f9973234ccf77f0a321860b783e47d82f (diff) |
fix all manner of wrongness with port buffer offsets
git-svn-id: svn://localhost/ardour2/branches/3.0@9098 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/port.h')
-rw-r--r-- | libs/ardour/ardour/port.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/libs/ardour/ardour/port.h b/libs/ardour/ardour/port.h index 3a45d010c7..300ecc24af 100644 --- a/libs/ardour/ardour/port.h +++ b/libs/ardour/ardour/port.h @@ -113,10 +113,8 @@ public: virtual void cycle_start (pframes_t) = 0; virtual void cycle_end (pframes_t) = 0; virtual void cycle_split () = 0; - virtual Buffer& get_buffer (framecnt_t nframes, framecnt_t offset = 0) = 0; - virtual void flush_buffers (pframes_t nframes, framepos_t /*time*/, framecnt_t offset = 0) { - assert (offset < nframes); - } + virtual Buffer& get_buffer (framecnt_t nframes) = 0; + virtual void flush_buffers (pframes_t nframes, framepos_t /*time*/) {} virtual void transport_stopped () {} bool physically_connected () const; @@ -125,6 +123,17 @@ public: PBD::Signal1<void,bool> MonitorInputChanged; + + static framecnt_t port_offset() { return _port_offset; } + + static void set_port_offset (framecnt_t off) { + _port_offset = off; + } + + static void increment_port_offset (framecnt_t n) { + _port_offset += n; + } + protected: Port (std::string const &, DataType, Flags); @@ -133,6 +142,7 @@ protected: static pframes_t _buffer_size; static bool _connecting_blocked; + static framecnt_t _port_offset; static AudioEngine* _engine; ///< the AudioEngine @@ -150,6 +160,7 @@ private: /** ports that we are connected to, kept so that we can reconnect to JACK when required */ std::set<std::string> _connections; + }; } |