X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Faudio_buffer.cc;h=de2c1ddf00b916701e889e9bae3f96ded2e9d807;hb=456fb789d3adcdb52de3abd863c1bf64c973effa;hp=aa4f64755aeb9399d31e402b8703eae2dd1a4d1d;hpb=25a6296f865620d5013cd634e693f7179e7edc84;p=ardour.git 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; }