diff options
author | Robin Gareus <robin@gareus.org> | 2014-02-03 16:59:51 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-02-03 16:59:51 +0100 |
commit | 74385d7267756e4101e9ffd59e319da972e72a76 (patch) | |
tree | 818a75b783e031303eb825ef38343989f9a98912 /libs/ardour/audio_buffer.cc | |
parent | 592be26a248bacda5bbe72d2da9e8539e5ce3915 (diff) |
remove cruft - unused _size in audio-buffers
Diffstat (limited to 'libs/ardour/audio_buffer.cc')
-rw-r--r-- | libs/ardour/audio_buffer.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/libs/ardour/audio_buffer.cc b/libs/ardour/audio_buffer.cc index aa4f64755a..de2c1ddf00 100644 --- a/libs/ardour/audio_buffer.cc +++ b/libs/ardour/audio_buffer.cc @@ -57,12 +57,6 @@ AudioBuffer::resize (size_t size) if (_data && size < _capacity) { /* buffer is already large enough */ - - if (size < _size) { - /* truncate */ - _size = size; - } - return; } @@ -71,14 +65,13 @@ AudioBuffer::resize (size_t size) cache_aligned_malloc ((void**) &_data, sizeof (Sample) * size); _capacity = size; - _size = 0; _silent = false; } bool -AudioBuffer::check_silence (pframes_t nframes, bool wholebuffer, pframes_t& n) const +AudioBuffer::check_silence (pframes_t nframes, pframes_t& n) const { - for (n = 0; (wholebuffer || n < _size) && n < nframes; ++n) { + for (n = 0; n < nframes; ++n) { if (_data[n] != Sample (0)) { return false; } |