From f62398d081db17afd1816bfc8312afb386f22e78 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 25 Jan 2020 10:05:34 +0100 Subject: [PATCH] Fix thinko two commits ago. --- src/lib/audio_buffers.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/audio_buffers.cc b/src/lib/audio_buffers.cc index 8d3a897c4..82df9d6f6 100644 --- a/src/lib/audio_buffers.cc +++ b/src/lib/audio_buffers.cc @@ -269,8 +269,11 @@ AudioBuffers::ensure_size (int32_t frames) } } - make_silent (_allocated_frames, frames - _allocated_frames); + int32_t const old_allocated = _allocated_frames; _allocated_frames = frames; + if (old_allocated < _allocated_frames) { + make_silent (old_allocated, _allocated_frames - old_allocated); + } } /** Mix some other buffers with these ones. The AudioBuffers must have the same number of channels. -- 2.30.2