summaryrefslogtreecommitdiff
path: root/libs/audiographer
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-02-16 14:00:31 +0100
committerRobin Gareus <robin@gareus.org>2016-02-16 14:00:31 +0100
commita929b8b872a161371f024171be44e58af44becee (patch)
tree58d115f2bdc6167b44f23551da72a96a0cbf921c /libs/audiographer
parente18e765c7553f2fc9b74323065e3bb4452c22cbb (diff)
fix Export SRC buffer report:
the resampler is always fed with N channels, it won't output half channels
Diffstat (limited to 'libs/audiographer')
-rw-r--r--libs/audiographer/src/general/sr_converter.cc2
1 files changed, 2 insertions, 0 deletions
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;