summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/audio_buffer.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/ardour/audio_buffer.h')
-rw-r--r--libs/ardour/ardour/audio_buffer.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/libs/ardour/ardour/audio_buffer.h b/libs/ardour/ardour/audio_buffer.h
index a32e679b69..91f463cc7f 100644
--- a/libs/ardour/ardour/audio_buffer.h
+++ b/libs/ardour/ardour/audio_buffer.h
@@ -62,7 +62,7 @@ public:
assert(&src != this);
assert(_capacity > 0);
assert(src.type() == DataType::AUDIO);
- assert(len <= _capacity);
+ assert(dst_offset + len <= _capacity);
assert( src_offset <= ((framecnt_t) src.capacity()-len));
memcpy(_data + dst_offset, ((const AudioBuffer&)src).data() + src_offset, sizeof(Sample) * len);
if (dst_offset == 0 && src_offset == 0 && len == _capacity) {
@@ -173,7 +173,6 @@ public:
void set_data (Sample* data, size_t size) {
assert(!_owns_data); // prevent leaks
_capacity = size;
- _size = size;
_data = data;
_silent = false;
_written = false;
@@ -185,8 +184,6 @@ public:
*/
void resize (size_t nframes);
- bool empty() const { return _size == 0; }
-
const Sample* data (framecnt_t offset = 0) const {
assert(offset <= _capacity);
return _data + offset;
@@ -198,7 +195,7 @@ public:
return _data + offset;
}
- bool check_silence (pframes_t, bool, pframes_t&) const;
+ bool check_silence (pframes_t, pframes_t&) const;
void prepare () { _written = false; _silent = false; }
bool written() const { return _written; }