From 0284203551f0f652a335e734a0c8ccd25333c27d Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 7 Dec 2018 04:15:55 +0100 Subject: [PATCH] Fix importing to a fixed-point format with resampling ResampledImportableSource::read() returns audio-frames; multiplication by number of channels read beyond the buffer. --- libs/ardour/import.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/ardour/import.cc b/libs/ardour/import.cc index 4c740c4d31..977729ddc9 100644 --- a/libs/ardour/import.cc +++ b/libs/ardour/import.cc @@ -278,7 +278,7 @@ write_audio_data_to_new_files (ImportableSource* source, ImportStatus& status, break; } - peak = compute_peak (data.get(), nread * channels, peak); + peak = compute_peak (data.get(), nread, peak); read_count += nread / channels; status.progress = 0.5 * read_count / (source->ratio() * source->length() * channels);