summaryrefslogtreecommitdiff
path: root/libs/ardour/import.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-12-07 04:15:55 +0100
committerRobin Gareus <robin@gareus.org>2018-12-07 04:16:28 +0100
commit0284203551f0f652a335e734a0c8ccd25333c27d (patch)
tree551482b85eb8bafbdc6284c4b141afdfcdb94cb1 /libs/ardour/import.cc
parentdd4c788d3e21b4f697f7eb6f2e64bc0d94ebf7fb (diff)
Fix importing to a fixed-point format with resampling
ResampledImportableSource::read() returns audio-frames; multiplication by number of channels read beyond the buffer.
Diffstat (limited to 'libs/ardour/import.cc')
-rw-r--r--libs/ardour/import.cc2
1 files changed, 1 insertions, 1 deletions
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);