diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 5a78bbaf7..8800a9de5 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -1078,6 +1078,7 @@ bool AudacityApp::OnExceptionInMainLoop() try { throw; } catch ( AudacityException &e ) { + (void)e;// Compiler food // Here is the catch-all for our own exceptions // Use CallAfter to delay this to the next pass of the event loop, diff --git a/src/TrackArtist.h b/src/TrackArtist.h index 1cd00c5e1..a40f7e885 100644 --- a/src/TrackArtist.h +++ b/src/TrackArtist.h @@ -77,12 +77,12 @@ class AUDACITY_DLL_API TrackArtist { void UpdatePrefs(); - void SetBackgroundBrushes(wxBrush unselectedBrush, wxBrush selectedBrush, - wxPen unselectedPen, wxPen selectedPen) { - this->unselectedBrush = unselectedBrush; - this->selectedBrush = selectedBrush; - this->unselectedPen = unselectedPen; - this->selectedPen = selectedPen; + void SetBackgroundBrushes(wxBrush unselectedBrushIn, wxBrush selectedBrushIn, + wxPen unselectedPenIn, wxPen selectedPenIn) { + this->unselectedBrush = unselectedBrushIn; + this->selectedBrush = selectedBrushIn; + this->unselectedPen = unselectedPenIn; + this->selectedPen = selectedPenIn; } // Helper: draws the "sync-locked" watermark tiled to a rectangle diff --git a/src/WaveClip.cpp b/src/WaveClip.cpp index 503bdff35..913991b57 100644 --- a/src/WaveClip.cpp +++ b/src/WaveClip.cpp @@ -255,11 +255,11 @@ public: LoadInvalidRegion(i, sequence, updateODCount); } - int CountODPixels(size_t start, size_t end) + int CountODPixels(size_t startIn, size_t endIn) { using namespace std; const int *begin = &bl[0]; - return count_if(begin + start, begin + end, bind2nd(less(), 0)); + return count_if(begin + startIn, begin + endIn, bind2nd(less(), 0)); } protected: @@ -830,7 +830,7 @@ bool SpecCache::CalculateOneSpectrum bool result = false; const bool reassignment = (settings.algorithm == SpectrogramSettings::algReassignment); - const size_t windowSize = settings.WindowSize(); + const size_t windowSizeSetting = settings.WindowSize(); sampleCount from; @@ -851,9 +851,9 @@ bool SpecCache::CalculateOneSpectrum const bool autocorrelation = settings.algorithm == SpectrogramSettings::algPitchEAC; - const size_t zeroPaddingFactor = settings.ZeroPaddingFactor(); - const size_t padding = (windowSize * (zeroPaddingFactor - 1)) / 2; - const size_t fftLen = windowSize * zeroPaddingFactor; + const size_t zeroPaddingFactorSetting = settings.ZeroPaddingFactor(); + const size_t padding = (windowSizeSetting * (zeroPaddingFactorSetting - 1)) / 2; + const size_t fftLen = windowSizeSetting * zeroPaddingFactorSetting; auto nBins = settings.NBins(); if (from < 0 || from >= numSamples) { @@ -872,9 +872,9 @@ bool SpecCache::CalculateOneSpectrum float *adj = scratch + padding; { - auto myLen = windowSize; + auto myLen = windowSizeSetting; // Take a window of the track centered at this sample. - from -= windowSize >> 1; + from -= windowSizeSetting >> 1; if (from < 0) { // Near the start of the clip, pad left with zeroes as needed. // from is at least -windowSize / 2 @@ -922,7 +922,7 @@ bool SpecCache::CalculateOneSpectrum wxASSERT(xx >= 0); float *const results = &out[nBins * xx]; // This function does not mutate useBuffer - ComputeSpectrum(useBuffer, windowSize, windowSize, + ComputeSpectrum(useBuffer, windowSizeSetting, windowSizeSetting, rate, results, autocorrelation, settings.windowType); } @@ -1071,21 +1071,21 @@ void SpecCache::Populate sampleCount numSamples, double offset, double rate, double pixelsPerSecond) { - const int &frequencyGain = settings.frequencyGain; - const size_t windowSize = settings.WindowSize(); + const int &frequencyGainSetting = settings.frequencyGain; + const size_t windowSizeSetting = settings.WindowSize(); const bool autocorrelation = settings.algorithm == SpectrogramSettings::algPitchEAC; const bool reassignment = settings.algorithm == SpectrogramSettings::algReassignment; #ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS - const size_t zeroPaddingFactor = settings.ZeroPaddingFactor(); + const size_t zeroPaddingFactorSetting = settings.ZeroPaddingFactor(); #else - const size_t zeroPaddingFactor = 1; + const size_t zeroPaddingFactorSetting = 1; #endif // FFT length may be longer than the window of samples that affect results // because of zero padding done for increased frequency resolution - const size_t fftLen = windowSize * zeroPaddingFactor; + const size_t fftLen = windowSizeSetting * zeroPaddingFactorSetting; const auto nBins = settings.NBins(); const size_t bufferSize = fftLen; @@ -1094,7 +1094,7 @@ void SpecCache::Populate std::vector gainFactors; if (!autocorrelation) - ComputeSpectrogramGainFactors(fftLen, rate, frequencyGain, gainFactors); + ComputeSpectrogramGainFactors(fftLen, rate, frequencyGainSetting, gainFactors); // Loop over the ranges before and after the copied portion and compute anew. // One of the ranges may be empty. diff --git a/src/effects/SBSMSEffect.cpp b/src/effects/SBSMSEffect.cpp index a0e1cac0e..7e91e0398 100644 --- a/src/effects/SBSMSEffect.cpp +++ b/src/effects/SBSMSEffect.cpp @@ -145,19 +145,19 @@ long postResampleCB(void *cb_data, SBSMSFrame *data) return count; } -void EffectSBSMS :: setParameters(double rateStart, double rateEnd, double pitchStart, double pitchEnd, - SlideType rateSlideType, SlideType pitchSlideType, - bool bLinkRatePitch, bool bRateReferenceInput, bool bPitchReferenceInput) +void EffectSBSMS :: setParameters(double rateStartIn, double rateEndIn, double pitchStartIn, double pitchEndIn, + SlideType rateSlideTypeIn, SlideType pitchSlideTypeIn, + bool bLinkRatePitchIn, bool bRateReferenceInputIn, bool bPitchReferenceInputIn) { - this->rateStart = rateStart; - this->rateEnd = rateEnd; - this->pitchStart = pitchStart; - this->pitchEnd = pitchEnd; - this->bLinkRatePitch = bLinkRatePitch; - this->rateSlideType = rateSlideType; - this->pitchSlideType = pitchSlideType; - this->bRateReferenceInput = bRateReferenceInput; - this->bPitchReferenceInput = bPitchReferenceInput; + this->rateStart = rateStartIn; + this->rateEnd = rateEndIn; + this->pitchStart = pitchStartIn; + this->pitchEnd = pitchEndIn; + this->bLinkRatePitch = bLinkRatePitchIn; + this->rateSlideType = rateSlideTypeIn; + this->pitchSlideType = pitchSlideTypeIn; + this->bRateReferenceInput = bRateReferenceInputIn; + this->bPitchReferenceInput = bPitchReferenceInputIn; } void EffectSBSMS::setParameters(double tempoRatio, double pitchRatio) diff --git a/src/effects/TimeScale.cpp b/src/effects/TimeScale.cpp index 2afb74861..bd62be3f6 100644 --- a/src/effects/TimeScale.cpp +++ b/src/effects/TimeScale.cpp @@ -161,10 +161,10 @@ double EffectTimeScale::CalcPreviewInputLength(double previewLength) if(inputLength == 0.0) { return 0.0; } else { - double rateStart = PercentChangeToRatio(m_RatePercentChangeStart); - double rateEnd = PercentChangeToRatio(m_RatePercentChangeEnd); + double rateStart1 = PercentChangeToRatio(m_RatePercentChangeStart); + double rateEnd1 = PercentChangeToRatio(m_RatePercentChangeEnd); double tOut = previewLength/inputLength; - double t = EffectSBSMS::getInvertedStretchedTime(rateStart,rateEnd,slideTypeRate,tOut); + double t = EffectSBSMS::getInvertedStretchedTime(rateStart1,rateEnd1,slideTypeRate,tOut); return t * inputLength; } } @@ -178,18 +178,18 @@ void EffectTimeScale::Preview(bool dryOnly) bool EffectTimeScale::Process() { - double pitchStart = PercentChangeToRatio(m_PitchPercentChangeStart); - double pitchEnd = PercentChangeToRatio(m_PitchPercentChangeEnd); - double rateStart = PercentChangeToRatio(m_RatePercentChangeStart); - double rateEnd = PercentChangeToRatio(m_RatePercentChangeEnd); + double pitchStart1 = PercentChangeToRatio(m_PitchPercentChangeStart); + double pitchEnd1 = PercentChangeToRatio(m_PitchPercentChangeEnd); + double rateStart1 = PercentChangeToRatio(m_RatePercentChangeStart); + double rateEnd1 = PercentChangeToRatio(m_RatePercentChangeEnd); if(bPreview) { double t = (mT1-mT0) / previewSelectedDuration; - rateEnd = EffectSBSMS::getRate(rateStart,rateEnd,slideTypeRate,t); - pitchEnd = EffectSBSMS::getRate(pitchStart,pitchEnd,slideTypePitch,t); + rateEnd1 = EffectSBSMS::getRate(rateStart1,rateEnd1,slideTypeRate,t); + pitchEnd1 = EffectSBSMS::getRate(pitchStart1,pitchEnd1,slideTypePitch,t); } - EffectSBSMS::setParameters(rateStart,rateEnd,pitchStart,pitchEnd,slideTypeRate,slideTypePitch,false,false,false); + EffectSBSMS::setParameters(rateStart1,rateEnd1,pitchStart1,pitchEnd1,slideTypeRate,slideTypePitch,false,false,false); return EffectSBSMS::Process(); } diff --git a/src/effects/lv2/LV2Effect.cpp b/src/effects/lv2/LV2Effect.cpp index 8c247e18f..c0a4cc8a7 100644 --- a/src/effects/lv2/LV2Effect.cpp +++ b/src/effects/lv2/LV2Effect.cpp @@ -1838,7 +1838,7 @@ bool LV2Effect::TransferDataToWindow() return true; } - for (size_t i = 0, groupCount = mGroups.GetCount(); i < GroupCount; i++) + for (size_t i = 0, groupCount = mGroups.GetCount(); i < groupCount; i++) { const auto & params = mGroupMap[mGroups[i]]; for (size_t pi = 0, ParamCount = params.size(); pi < ParamCount; pi++) diff --git a/src/prefs/SpectrogramSettings.cpp b/src/prefs/SpectrogramSettings.cpp index 1337684e2..5c91a4940 100644 --- a/src/prefs/SpectrogramSettings.cpp +++ b/src/prefs/SpectrogramSettings.cpp @@ -389,8 +389,8 @@ namespace case TWINDOW: NewWindowFunc(windowType, windowSize, extra, window.get() + padding); { - for (int ii = padding, multiplier = -(int)windowSize / 2; ii < (int)endOfWindow; ++ii, ++multiplier) - window[ii] *= multiplier; + for (int jj = padding, multiplier = -(int)windowSize / 2; jj < (int)endOfWindow; ++jj, ++multiplier) + window[jj] *= multiplier; } break; case DWINDOW: @@ -485,7 +485,7 @@ size_t SpectrogramSettings::NBins() const return GetFFTLength() / 2; } -NumberScale SpectrogramSettings::GetScale( float minFreq, float maxFreq ) const +NumberScale SpectrogramSettings::GetScale( float minFreqIn, float maxFreqIn ) const { NumberScaleType type = nstLinear; @@ -508,7 +508,7 @@ NumberScale SpectrogramSettings::GetScale( float minFreq, float maxFreq ) const type = nstPeriod; break; } - return NumberScale(type, minFreq, maxFreq); + return NumberScale(type, minFreqIn, maxFreqIn); } bool SpectrogramSettings::SpectralSelectionEnabled() const diff --git a/src/toolbars/ToolDock.cpp b/src/toolbars/ToolDock.cpp index a3b149680..ee38e1479 100644 --- a/src/toolbars/ToolDock.cpp +++ b/src/toolbars/ToolDock.cpp @@ -733,7 +733,7 @@ ToolBarConfiguration::Position void ModifySize (ToolBar *ct, - const wxRect &rect, + const wxRect &rectIn, ToolBarConfiguration::Position prevPosition, ToolBarConfiguration::Position position, wxSize &sz) @@ -743,16 +743,16 @@ ToolBarConfiguration::Position // and is in the right place. // Does the location fall within this bar? - if (rect.Contains(point)) + if (rectIn.Contains(point)) { sz = tb->GetDockedSize(); // Choose a position always, if there is a bar to displace. // Else, only if the fit is possible. - if (ct || (sz.x <= rect.width && sz.y <= rect.height)) { + if (ct || (sz.x <= rectIn.width && sz.y <= rectIn.height)) { // May choose current or previous. if (ct && - (sz.y < rect.height || - point.y < (rect.GetTop() + rect.GetBottom()) / 2)) + (sz.y < rectIn.height || + point.y < (rectIn.GetTop() + rectIn.GetBottom()) / 2)) // "Wedge" the bar into a crack alone, not adopting others, // if either a short bar displaces a tall one, or else // the displacing bar is at least at tall, but the pointer is @@ -766,13 +766,13 @@ ToolBarConfiguration::Position } void Visit - (ToolBar *, wxPoint point) + (ToolBar *, wxPoint pointIn) override { if (result != ToolBarConfiguration::UnspecifiedPosition) { // If we've placed it, we're done. - rect.x = point.x; - rect.y = point.y; + rect.x = pointIn.x; + rect.y = pointIn.y; if (usedPrev) rect.y -= tb->GetDockedSize().GetHeight() / 2; @@ -792,8 +792,8 @@ ToolBarConfiguration::Position if (result == ToolBarConfiguration::UnspecifiedPosition) { // Default of all other placements. result = finalPosition; - wxPoint point { finalRect.GetLeft(), finalRect.GetBottom() }; - rect.SetPosition(point); + wxPoint point1 { finalRect.GetLeft(), finalRect.GetBottom() }; + rect.SetPosition(point1); } }