mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-15 07:01:18 +02:00
Common function limits buffer size to sampleCount known to be small
This commit is contained in:
@@ -388,10 +388,8 @@ int PCMImportFileHandle::Import(TrackFactory *trackFactory,
|
||||
int updateCounter = 0;
|
||||
|
||||
for (sampleCount i = 0; i < fileTotalFrames; i += maxBlockSize) {
|
||||
|
||||
sampleCount blockLen = maxBlockSize;
|
||||
if (i + blockLen > fileTotalFrames)
|
||||
blockLen = fileTotalFrames - i;
|
||||
const auto blockLen =
|
||||
limitSampleBufferSize( maxBlockSize, fileTotalFrames - i );
|
||||
|
||||
auto iter = channels.begin();
|
||||
for (int c = 0; c < mInfo.channels; ++iter, ++c)
|
||||
|
Reference in New Issue
Block a user