1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-08 14:13:57 +01:00

Workaround build breakers. Needs review.

These changes fix a broken build in Windows.
#include <algorithm> needed for min/max to be in std.
decltype(+name) was declaring a const variable, that could not be incremented.  Changed to auto.
This commit is contained in:
James Crook
2016-08-23 21:46:12 +01:00
parent b20a9bacad
commit 781de82d02
10 changed files with 12 additions and 11 deletions

View File

@@ -235,7 +235,7 @@ bool EffectReverse::ProcessOneClip(int count, WaveTrack *track,
track->Get((samplePtr)buffer1, floatSample, first, block);
track->Get((samplePtr)buffer2, floatSample, second, block);
for (decltype(+block) i = 0; i < block; i++) {
for (auto i = 0; i < block; i++) {
tmp = buffer1[i];
buffer1[i] = buffer2[block-i-1];
buffer2[block-i-1] = tmp;

View File

@@ -108,7 +108,7 @@ long resampleCB(void *cb_data, SBSMSFrame *data)
r->rightTrack->Get((samplePtr)(r->rightBuffer), floatSample, r->offset, blockSize);
// convert to sbsms audio format
for(decltype(+blockSize) i=0; i<blockSize; i++) {
for(auto i=0; i<blockSize; i++) {
r->buf[i][0] = r->leftBuffer[i];
r->buf[i][1] = r->rightBuffer[i];
}

View File

@@ -291,7 +291,7 @@ bool EffectSoundTouch::ProcessStereo(WaveTrack* leftTrack, WaveTrack* rightTrack
rightTrack->Get((samplePtr)(rightBuffer), floatSample, sourceSampleCount, blockSize);
// Interleave into soundTouchBuffer.
for (decltype(+blockSize) index = 0; index < blockSize; index++) {
for (auto index = 0; index < blockSize; index++) {
soundTouchBuffer[index*2] = leftBuffer[index];
soundTouchBuffer[(index*2)+1] = rightBuffer[index];
}

View File

@@ -145,7 +145,7 @@ bool EffectStereoToMono::ProcessOne(int count)
bResult &= mLeftTrack->Get((samplePtr)leftBuffer, floatSample, index, idealBlockLen);
bResult &= mRightTrack->Get((samplePtr)rightBuffer, floatSample, index, idealBlockLen);
const auto limit = limitSampleBufferSize( idealBlockLen, mEnd - index );
for (decltype(+limit) i = 0; i < limit; ++i) {
for (auto i = 0; i < limit; ++i) {
index++;
curLeftFrame = leftBuffer[i];
curRightFrame = rightBuffer[i];

View File

@@ -630,7 +630,7 @@ bool EffectTruncSilence::Analyze(RegionList& silenceList,
wt->Get((samplePtr)(buffer), floatSample, *index, count);
// Look for silenceList in current block
for (decltype(+count) i = 0; i < count; ++i) {
for (auto i = 0; i < count; ++i) {
if (inputLength && ((outLength >= previewLen) || (outLength > wt->TimeToLongSamples(*minInputLength)))) {
*inputLength = wt->LongSamplesToTime(*index + i) - wt->LongSamplesToTime(start);
break;