1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 15:23:48 +01:00

Created a global structure to hold spectrogram preferences...

Don't read "/Spectrum/" preferences anywhere but in SpectrumPrefs.cpp.
Don't store global values in TrackArtist.

Possibly some day, there will be other instances of SpectrogramSettings so we
can have independent per-track settings.
This commit is contained in:
Paul Licameli
2015-06-04 00:05:46 -04:00
parent 38f24a42ef
commit 952a22c8b1
6 changed files with 183 additions and 122 deletions

View File

@@ -71,4 +71,46 @@ class SpectrumPrefs:public PrefsPanel
#endif
};
struct SpectrogramSettings
{
static SpectrogramSettings &defaults();
SpectrogramSettings();
void UpdatePrefs();
int minFreq;
int maxFreq;
int logMinFreq;
int logMaxFreq;
int range;
int gain;
int frequencyGain;
int windowType;
int windowSize;
#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
int zeroPaddingFactor;
#endif
bool isGrayscale;
#ifdef EXPERIMENTAL_FFT_SKIP_POINTS
int fftSkipPoints;
#endif
#ifdef EXPERIMENTAL_FFT_Y_GRID
bool fftYGrid;
#endif //EXPERIMENTAL_FFT_Y_GRID
#ifdef EXPERIMENTAL_FIND_NOTES
bool fftFindNotes;
bool findNotesMinA;
bool numberOfMaxima;
bool findNotesQuantize;
#endif //EXPERIMENTAL_FIND_NOTES
};
#endif