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/audio_buffer.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/audio_buffer.h')
-rw-r--r-- | libs/ardour/ardour/audio_buffer.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h index 403a70232f..63eb7d7c20 100644 --- a/libs/ardour/ardour/audio_buffer.h +++ b/libs/ardour/ardour/audio_buffer.h @@ -49,6 +49,9 @@ public: assert(src.type() == DataType::AUDIO); assert(len <= _capacity); memcpy(_data + dst_offset, ((AudioBuffer&)src).data() + src_offset, sizeof(Sample) * len); + if (next_write_addr >= _data + _capacity) { + next_write_addr = _data; + } if (dst_offset == 0 && src_offset == 0 && len == _capacity) { _silent = src.silent(); } else { @@ -169,11 +172,12 @@ public: void prepare () { _written = false; } bool written() const { return _written; } + void set_marked_for_write (bool yn) { mfw = yn; } + private: bool _owns_data; bool _written; Sample* _data; ///< Actual buffer contents - }; |