mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-17 14:11:13 +01:00
fix WaveTrackCache, again...
... There was still some duplicated loading of block files during normal forward play, though not more than two loads per file.
This commit is contained in:
@@ -2661,9 +2661,7 @@ constSamplePtr WaveTrackCache::Get(sampleFormat format,
|
||||
// Request starts in the second buffer and extends past it.
|
||||
// Discard the first buffer.
|
||||
// (But don't deallocate the buffer space.)
|
||||
float *save = mBuffers[0].data;
|
||||
mBuffers[0] = mBuffers[1];
|
||||
mBuffers[1].data = save;
|
||||
mBuffers[0] .swap ( mBuffers[1] );
|
||||
fillSecond = true;
|
||||
mNValidBuffers = 1;
|
||||
}
|
||||
@@ -2678,9 +2676,7 @@ constSamplePtr WaveTrackCache::Get(sampleFormat format,
|
||||
// refill the first.
|
||||
// (This case might be useful when marching backwards through
|
||||
// the track, as with scrubbing.)
|
||||
float *save = mBuffers[1].data;
|
||||
mBuffers[1] = mBuffers[0];
|
||||
mBuffers[0].data = save;
|
||||
mBuffers[0] .swap ( mBuffers[1] );
|
||||
fillFirst = true;
|
||||
fillSecond = false;
|
||||
// Cache is not in a consistent state yet
|
||||
|
||||
Reference in New Issue
Block a user