From a929b8b872a161371f024171be44e58af44becee Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 16 Feb 2016 14:00:31 +0100 Subject: fix Export SRC buffer report: the resampler is always fed with N channels, it won't output half channels --- libs/audiographer/src/general/sr_converter.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs') diff --git a/libs/audiographer/src/general/sr_converter.cc b/libs/audiographer/src/general/sr_converter.cc index 90de3e58d7..9b5fa801fe 100644 --- a/libs/audiographer/src/general/sr_converter.cc +++ b/libs/audiographer/src/general/sr_converter.cc @@ -78,6 +78,8 @@ SampleRateConverter::allocate_buffers (framecnt_t max_frames) if (!active) { return max_frames; } framecnt_t max_frames_out = (framecnt_t) ceil (max_frames * src_data.src_ratio); + max_frames_out -= max_frames_out % channels; + if (data_out_size < max_frames_out) { delete[] data_out; -- cgit v1.2.3