1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-13 08:06:32 +01: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

@@ -98,15 +98,15 @@ bool CompareAudioCommand::Apply(CommandExecutionContext context)
double errorThreshold = GetDouble(wxT("Threshold"));
// Initialize buffers for track data to be analyzed
int buffSize = min(mTrack0->GetMaxBlockSize(), mTrack1->GetMaxBlockSize());
auto buffSize = std::min(mTrack0->GetMaxBlockSize(), mTrack1->GetMaxBlockSize());
float *buff0 = new float[buffSize];
float *buff1 = new float[buffSize];
// Compare tracks block by block
long s0 = mTrack0->TimeToLongSamples(mT0);
long s1 = mTrack0->TimeToLongSamples(mT1);
long position = s0;
long length = s1 - s0;
auto s0 = mTrack0->TimeToLongSamples(mT0);
auto s1 = mTrack0->TimeToLongSamples(mT1);
auto position = s0;
auto length = s1 - s0;
while (position < s1)
{
// Get a block of data into the buffers