mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-10 17:11:17 +02:00
more simplification of arguments
This commit is contained in:
parent
a6172d932b
commit
e4fe449021
@ -789,11 +789,13 @@ void SpecCache::CalculateOneSpectrum
|
|||||||
WaveTrackCache &waveTrackCache,
|
WaveTrackCache &waveTrackCache,
|
||||||
int xx, sampleCount numSamples,
|
int xx, sampleCount numSamples,
|
||||||
double offset, double rate,
|
double offset, double rate,
|
||||||
bool autocorrelation, const std::vector<float> &gainFactors,
|
const std::vector<float> &gainFactors,
|
||||||
float *scratch)
|
float *scratch)
|
||||||
{
|
{
|
||||||
const int windowSize = settings.windowSize;
|
const int windowSize = settings.windowSize;
|
||||||
sampleCount start = where[xx];
|
sampleCount start = where[xx];
|
||||||
|
const bool autocorrelation =
|
||||||
|
settings.algorithm == SpectrogramSettings::algPitchEAC;
|
||||||
const int zeroPaddingFactor = (autocorrelation ? 1 : settings.zeroPaddingFactor);
|
const int zeroPaddingFactor = (autocorrelation ? 1 : settings.zeroPaddingFactor);
|
||||||
const int padding = (windowSize * (zeroPaddingFactor - 1)) / 2;
|
const int padding = (windowSize * (zeroPaddingFactor - 1)) / 2;
|
||||||
const int fftLen = windowSize * zeroPaddingFactor;
|
const int fftLen = windowSize * zeroPaddingFactor;
|
||||||
@ -906,7 +908,7 @@ void SpecCache::Populate
|
|||||||
for (sampleCount xx = lowerBoundX; xx < upperBoundX; ++xx)
|
for (sampleCount xx = lowerBoundX; xx < upperBoundX; ++xx)
|
||||||
CalculateOneSpectrum(
|
CalculateOneSpectrum(
|
||||||
settings, waveTrackCache, xx, numSamples,
|
settings, waveTrackCache, xx, numSamples,
|
||||||
offset, rate, autocorrelation, gainFactors, &buffer[0]);
|
offset, rate, gainFactors, &buffer[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ public:
|
|||||||
WaveTrackCache &waveTrackCache,
|
WaveTrackCache &waveTrackCache,
|
||||||
int xx, sampleCount numSamples,
|
int xx, sampleCount numSamples,
|
||||||
double offset, double rate,
|
double offset, double rate,
|
||||||
bool autocorrelation, const std::vector<float> &gainFactors,
|
const std::vector<float> &gainFactors,
|
||||||
float *scratch);
|
float *scratch);
|
||||||
|
|
||||||
void Populate
|
void Populate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user