~ubuntu-branches/ubuntu/utopic/ardour3/utopic

« back to all changes in this revision

Viewing changes to libs/ardour/ardour/audio_buffer.h

  • Committer: Package Import Robot
  • Author(s): Adrian Knoth
  • Date: 2014-02-25 14:13:18 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140225141318-y760kgxso78rduuf
Tags: 3.5.357~dfsg-1
* Imported Upstream version 3.5.357~dfsg
* Critical bugfix release. All users are recommended to upgrade.
* Details: https://community.ardour.org/node/8015

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
                assert(&src != this);
63
63
                assert(_capacity > 0);
64
64
                assert(src.type() == DataType::AUDIO);
65
 
                assert(len <= _capacity);
 
65
                assert(dst_offset + len <= _capacity);
66
66
                assert( src_offset <= ((framecnt_t) src.capacity()-len));
67
67
                memcpy(_data + dst_offset, ((const AudioBuffer&)src).data() + src_offset, sizeof(Sample) * len);
68
68
                if (dst_offset == 0 && src_offset == 0 && len == _capacity) {
173
173
        void set_data (Sample* data, size_t size) {
174
174
                assert(!_owns_data); // prevent leaks
175
175
                _capacity = size;
176
 
                _size = size;
177
176
                _data = data;
178
177
                _silent = false;
179
178
                _written = false;
185
184
         */
186
185
        void resize (size_t nframes);
187
186
 
188
 
        bool empty() const { return _size == 0; }
189
 
 
190
187
        const Sample* data (framecnt_t offset = 0) const {
191
188
                assert(offset <= _capacity);
192
189
                return _data + offset;
198
195
                return _data + offset;
199
196
        }
200
197
 
201
 
        bool check_silence (pframes_t, bool, pframes_t&) const;
 
198
        bool check_silence (pframes_t, pframes_t&) const;
202
199
 
203
200
        void prepare () { _written = false; _silent = false; }
204
201
        bool written() const { return _written; }