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