Fix importing to a fixed-point format with resampling
ResampledImportableSource::read() returns audio-frames; multiplication by number of channels read beyond the buffer.
This commit is contained in:
parent
dd4c788d3e
commit
0284203551
@ -278,7 +278,7 @@ write_audio_data_to_new_files (ImportableSource* source, ImportStatus& status,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
peak = compute_peak (data.get(), nread * channels, peak);
|
peak = compute_peak (data.get(), nread, peak);
|
||||||
|
|
||||||
read_count += nread / channels;
|
read_count += nread / channels;
|
||||||
status.progress = 0.5 * read_count / (source->ratio() * source->length() * channels);
|
status.progress = 0.5 * read_count / (source->ratio() * source->length() * channels);
|
||||||
|
Loading…
Reference in New Issue
Block a user