11#ifndef __AUDACITY_WAVECLIP_SPECTRUM_CACHE__
12#define __AUDACITY_WAVECLIP_SPECTRUM_CACHE__
42 bool Matches(
int dirty_,
double pixelsPerSecond,
46 bool CalculateOneSpectrum
50 double offset,
double rate,
double pixelsPerSecond,
51 int lowerBoundX,
int upperBoundX,
52 const std::vector<float> &gainFactors,
53 float* __restrict scratch,
54 float* __restrict out)
const;
58 double pixelsPerSecond,
double start_);
63 int copyBegin,
int copyEnd,
size_t numPixels,
65 double offset,
double rate,
double pixelsPerSecond);
70 double leftTrim{ .0 };
71 double rightTrim{ .0 };
74 size_t windowSize { 0 };
75 unsigned zeroPaddingFactor { 0 };
123 const float *& spectrogram,
126 double t0,
double pixelsPerSecond);
static Settings & settings()
A short-lived object, during whose lifetime, the contents of the WaveTrack are assumed not to change.
std::vector< float > freq
std::vector< sampleCount > where
SpecPxCache(size_t cacheLen)
Spectrogram settings, either for one track or as defaults.
This allows multiple clips to be a part of one WaveTrack.
Positions or offsets within audio files need a wide type.
static WaveClipSpectrumCache & Get(const WaveClip &clip)
std::unique_ptr< SpecCache > mSpecCache
~WaveClipSpectrumCache() override
std::unique_ptr< SpecPxCache > mSpecPxCache
bool GetSpectrogram(const WaveClip &clip, SampleTrackCache &cache, const float *&spectrogram, const sampleCount *&where, size_t numPixels, double t0, double pixelsPerSecond)
void Invalidate() override
void MarkChanged() override