![]() |
Audacity 3.2.0
|
#include <SpectrumCache.h>
Public Member Functions | |
| SpecCache () | |
| ~SpecCache () | |
| bool | Matches (int dirty_, double samplesPerPixel, const SpectrogramSettings &settings) const |
| void | Grow (size_t len_, SpectrogramSettings &settings, double samplesPerPixel, double start) |
| void | Populate (const SpectrogramSettings &settings, const WaveChannelInterval &clip, int copyBegin, int copyEnd, size_t numPixels, double pixelsPerSecond) |
Public Attributes | |
| size_t | len { 0 } |
| int | algorithm |
| double | spp |
| double | leftTrim { .0 } |
| double | rightTrim { .0 } |
| double | start |
| int | windowType |
| size_t | windowSize { 0 } |
| unsigned | zeroPaddingFactor { 0 } |
| int | frequencyGain |
| std::vector< float > | freq |
| std::vector< sampleCount > | where |
| int | dirty |
Private Member Functions | |
| bool | CalculateOneSpectrum (const SpectrogramSettings &settings, const WaveChannelInterval &clip, const int xx, double pixelsPerSecond, int lowerBoundX, int upperBoundX, const std::vector< float > &gainFactors, float *__restrict scratch, float *__restrict out) const |
Private Attributes | |
| std::optional< AudioSegmentSampleView > | mSampleCacheHolder |
Definition at line 26 of file SpectrumCache.h.
|
inline |
Definition at line 30 of file SpectrumCache.h.
|
inline |
Definition at line 40 of file SpectrumCache.h.
|
private |
Definition at line 94 of file SpectrumCache.cpp.
References SpectrogramSettings::algPitchEAC, SpectrogramSettings::algReassignment, sampleCount::as_long_long(), ComputeSpectrum(), anonymous_namespace{SpectrumCache.cpp}::ComputeSpectrumUsingRealFFTf(), staffpad::vo::copy(), Sequence::GetNumSamples(), WaveClipChannel::GetRate(), WaveClipChannel::GetSampleView(), WaveClipChannel::GetSequence(), WaveClipChannel::GetStretchRatio(), anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel, len, M_PI, mSampleCacheHolder, fast_float::detail::power(), RealFFTf(), anonymous_namespace{ClipSegmentTest.cpp}::sampleRate, settings(), and where.
Referenced by Populate().
| void SpecCache::Grow | ( | size_t | len_, |
| SpectrogramSettings & | settings, | ||
| double | samplesPerPixel, | ||
| double | start | ||
| ) |
Definition at line 318 of file SpectrumCache.cpp.
References algorithm, freq, frequencyGain, len, settings(), spp, start, where, windowSize, windowType, and zeroPaddingFactor.
Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum().
| bool SpecCache::Matches | ( | int | dirty_, |
| double | samplesPerPixel, | ||
| const SpectrogramSettings & | settings | ||
| ) | const |
Definition at line 75 of file SpectrumCache.cpp.
References algorithm, dirty, frequencyGain, len, settings(), spp, windowSize, windowType, and zeroPaddingFactor.
| void SpecCache::Populate | ( | const SpectrogramSettings & | settings, |
| const WaveChannelInterval & | clip, | ||
| int | copyBegin, | ||
| int | copyEnd, | ||
| size_t | numPixels, | ||
| double | pixelsPerSecond | ||
| ) |
Definition at line 342 of file SpectrumCache.cpp.
References SpectrogramSettings::algPitchEAC, SpectrogramSettings::algReassignment, CalculateOneSpectrum(), anonymous_namespace{SpectrumCache.cpp}::ComputeSpectrogramGainFactors(), freq, WaveClipChannel::GetRate(), WaveClipChannel::GetStretchRatio(), min(), fast_float::detail::power(), anonymous_namespace{ClipSegmentTest.cpp}::sampleRate, and settings().
Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum().
| int SpecCache::algorithm |
Definition at line 59 of file SpectrumCache.h.
| int SpecCache::dirty |
Definition at line 71 of file SpectrumCache.h.
Referenced by Matches().
| std::vector<float> SpecCache::freq |
Definition at line 68 of file SpectrumCache.h.
Referenced by anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), Grow(), and Populate().
| int SpecCache::frequencyGain |
Definition at line 67 of file SpectrumCache.h.
| double SpecCache::leftTrim { .0 } |
Definition at line 61 of file SpectrumCache.h.
| size_t SpecCache::len { 0 } |
Definition at line 58 of file SpectrumCache.h.
Referenced by CalculateOneSpectrum(), Grow(), and Matches().
|
mutableprivate |
Definition at line 81 of file SpectrumCache.h.
Referenced by CalculateOneSpectrum().
| double SpecCache::rightTrim { .0 } |
Definition at line 62 of file SpectrumCache.h.
| double SpecCache::spp |
Definition at line 60 of file SpectrumCache.h.
| double SpecCache::start |
Definition at line 63 of file SpectrumCache.h.
Referenced by Grow().
| std::vector<sampleCount> SpecCache::where |
Definition at line 69 of file SpectrumCache.h.
Referenced by CalculateOneSpectrum(), anonymous_namespace{SpectrumView.cpp}::DrawClipSpectrum(), and Grow().
| size_t SpecCache::windowSize { 0 } |
Definition at line 65 of file SpectrumCache.h.
| int SpecCache::windowType |
Definition at line 64 of file SpectrumCache.h.
| unsigned SpecCache::zeroPaddingFactor { 0 } |
Definition at line 66 of file SpectrumCache.h.