mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-24 00:18:07 +02:00
Define and use SpectrogramSettings::GetFFTLength()
This commit is contained in:
parent
778e7726df
commit
a1621f7d1b
@ -2104,7 +2104,7 @@ void TrackArtist::DrawClipSpectrum(WaveTrackCache &waveTrackCache,
|
||||
return;
|
||||
unsigned char *data = image->GetData();
|
||||
|
||||
const int half = GetSpectrumWindowSize(!autocorrelation) / 2;
|
||||
const int half = settings.GetFFTLength(autocorrelation) / 2;
|
||||
const double binUnit = rate / (2 * half);
|
||||
const float *freq = 0;
|
||||
const sampleCount *where = 0;
|
||||
|
@ -253,3 +253,12 @@ void SpectrogramSettings::CacheWindows() const
|
||||
}
|
||||
#endif // EXPERIMENTAL_USE_REALFFTF
|
||||
}
|
||||
|
||||
int SpectrogramSettings::GetFFTLength(bool autocorrelation) const
|
||||
{
|
||||
return windowSize
|
||||
#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
|
||||
* (!autocorrelation ? zeroPaddingFactor : 1);
|
||||
#endif
|
||||
;
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
int zeroPaddingFactor;
|
||||
#endif
|
||||
|
||||
int GetFFTLength(bool autocorrelation) const; // window size (times zero padding, if STFT)
|
||||
|
||||
bool isGrayscale;
|
||||
|
||||
#ifdef EXPERIMENTAL_FFT_Y_GRID
|
||||
|
Loading…
x
Reference in New Issue
Block a user