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

More decltype and auto, mostly for loop index variables

This commit is contained in:
Paul Licameli
2016-09-06 19:46:56 -04:00
parent 919d77d176
commit 2a2013cb4b
5 changed files with 13 additions and 14 deletions

View File

@@ -573,7 +573,7 @@ sampleCount Mixer::MixSameRate(int *channelFlags, WaveTrackCache &cache,
auto results = cache.Get(floatSample, *pos - (slen - 1), slen);
memcpy(mFloatBuffer, results, sizeof(float) * slen);
track->GetEnvelopeValues(mEnvValues, slen, t - (slen - 1) / mRate);
for(int i=0; i<slen; i++)
for(decltype(slen) i = 0; i < slen; i++)
mFloatBuffer[i] *= mEnvValues[i]; // Track gain control will go here?
ReverseSamples((samplePtr)mFloatBuffer, floatSample, 0, slen);
@@ -583,7 +583,7 @@ sampleCount Mixer::MixSameRate(int *channelFlags, WaveTrackCache &cache,
auto results = cache.Get(floatSample, *pos, slen);
memcpy(mFloatBuffer, results, sizeof(float) * slen);
track->GetEnvelopeValues(mEnvValues, slen, t);
for(int i=0; i<slen; i++)
for(decltype(slen) i = 0; i < slen; i++)
mFloatBuffer[i] *= mEnvValues[i]; // Track gain control will go here?
*pos += slen;