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

Fix Windows build differently

This commit is contained in:
Paul Licameli
2016-08-24 12:13:53 -04:00
parent 781de82d02
commit b5e410d987
9 changed files with 22 additions and 22 deletions

View File

@@ -229,13 +229,13 @@ bool EffectReverse::ProcessOneClip(int count, WaveTrack *track,
sampleCount originalLen = (sampleCount)originalEnd-originalStart;
while (len > 1) {
const auto block =
auto block =
limitSampleBufferSize( track->GetBestBlockSize(first), len / 2 );
second = first + (len - block);
track->Get((samplePtr)buffer1, floatSample, first, block);
track->Get((samplePtr)buffer2, floatSample, second, block);
for (auto i = 0; i < block; i++) {
for (decltype(block) i = 0; i < block; i++) {
tmp = buffer1[i];
buffer1[i] = buffer2[block-i-1];
buffer2[block-i-1] = tmp;

View File

@@ -98,7 +98,7 @@ long resampleCB(void *cb_data, SBSMSFrame *data)
{
ResampleBuf *r = (ResampleBuf*) cb_data;
const auto blockSize = limitSampleBufferSize(
auto blockSize = limitSampleBufferSize(
r->leftTrack->GetBestBlockSize(r->offset),
r->end - r->offset
);
@@ -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(auto i=0; i<blockSize; i++) {
for(decltype(blockSize) i=0; i<blockSize; i++) {
r->buf[i][0] = r->leftBuffer[i];
r->buf[i][1] = r->rightBuffer[i];
}

View File

@@ -281,7 +281,7 @@ bool EffectSoundTouch::ProcessStereo(WaveTrack* leftTrack, WaveTrack* rightTrack
while (sourceSampleCount < end) {
//Get a block of samples (smaller than the size of the buffer)
//Adjust the block size if it is the final block in the track
const auto blockSize = limitSampleBufferSize(
auto blockSize = limitSampleBufferSize(
leftTrack->GetBestBlockSize(sourceSampleCount),
end - sourceSampleCount
);
@@ -291,7 +291,7 @@ bool EffectSoundTouch::ProcessStereo(WaveTrack* leftTrack, WaveTrack* rightTrack
rightTrack->Get((samplePtr)(rightBuffer), floatSample, sourceSampleCount, blockSize);
// Interleave into soundTouchBuffer.
for (auto index = 0; index < blockSize; index++) {
for (decltype(blockSize) index = 0; index < blockSize; index++) {
soundTouchBuffer[index*2] = leftBuffer[index];
soundTouchBuffer[(index*2)+1] = rightBuffer[index];
}

View File

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

View File

@@ -624,13 +624,13 @@ bool EffectTruncSilence::Analyze(RegionList& silenceList,
// End of optimization
// Limit size of current block if we've reached the end
const auto count = limitSampleBufferSize( blockLen, end - *index );
auto count = limitSampleBufferSize( blockLen, end - *index );
// Fill buffer
wt->Get((samplePtr)(buffer), floatSample, *index, count);
// Look for silenceList in current block
for (auto i = 0; i < count; ++i) {
for (decltype(count) i = 0; i < count; ++i) {
if (inputLength && ((outLength >= previewLen) || (outLength > wt->TimeToLongSamples(*minInputLength)))) {
*inputLength = wt->LongSamplesToTime(*index + i) - wt->LongSamplesToTime(start);
break;