1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 00:03:52 +02:00

Type agnosticism for some other variables that were not sampleCount...

... in some cases, this fixes narrowings.
This commit is contained in:
Paul Licameli
2016-08-24 07:56:33 -04:00
parent 79c79f9cd3
commit fd2b050d6f
16 changed files with 26 additions and 29 deletions

View File

@@ -150,7 +150,7 @@ void MixAndRender(TrackList *tracks, TrackFactory *trackFactory,
int maxBlockLen = mixLeft->GetIdealBlockSize();
auto maxBlockLen = mixLeft->GetIdealBlockSize();
// If the caller didn't specify a time range, use the whole range in which
// any input track had clips in it.
@@ -338,9 +338,7 @@ Mixer::Mixer(const WaveTrackConstArray &inputTracks,
mQueueLen[i] = 0;
}
int envLen = mInterleavedBufferSize;
if (mQueueMaxLen > envLen)
envLen = mQueueMaxLen;
const auto envLen = std::max(mQueueMaxLen, mInterleavedBufferSize);
mEnvValues = new double[envLen];
}
@@ -557,7 +555,7 @@ sampleCount Mixer::MixSameRate(int *channelFlags, WaveTrackCache &cache,
sampleCount *pos)
{
const WaveTrack *const track = cache.GetTrack();
int slen = mMaxOut;
auto slen = mMaxOut;
int c;
const double t = *pos / track->GetRate();
const double trackEndTime = track->GetEndTime();