Audacity 3.2.0
Classes | Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
SpectrumTransformer Class Referenceabstract

A class that transforms a portion of a wave track (preserving duration) by applying Fourier transform, then modifying coefficients, then inverse Fourier transform and overlap-add to reconstruct. More...

#include <SpectrumTransformer.h>

Inheritance diagram for SpectrumTransformer:
[legend]
Collaboration diagram for SpectrumTransformer:
[legend]

Classes

struct  Window
 Derive this class to add information to the queue. More...
 

Public Types

using FloatVector = std::vector< float >
 
using WindowProcessor = std::function< bool(SpectrumTransformer &) >
 Type of function that transforms windows in the queue. More...
 

Public Member Functions

 SpectrumTransformer (bool needsOutput, eWindowFunctions inWindowType, eWindowFunctions outWindowType, size_t windowSize, unsigned stepsPerWindow, bool leadingPadding, bool trailingPadding)
 
virtual ~SpectrumTransformer ()
 
bool NeedsOutput () const
 
bool Start (size_t queueLength)
 Call once before a sequence of calls to ProcessSamples; Invokes DoStart. More...
 
bool ProcessSamples (const WindowProcessor &processor, const float *buffer, size_t len)
 Call multiple times. More...
 
bool Finish (const WindowProcessor &processor)
 
virtual std::unique_ptr< WindowNewWindow (size_t windowSize)
 Allocates a window to place in the queue. More...
 
virtual bool DoStart ()
 Called before any calls to ProcessWindow. More...
 
virtual void DoOutput (const float *outBuffer, size_t mStepSize)=0
 Called within ProcessSamples if output was requested. More...
 
virtual bool DoFinish ()
 Called after the last call to ProcessWindow(). More...
 
size_t TotalQueueSize () const
 Useful functions to implement WindowProcesser: More...
 
size_t CurrentQueueSize () const
 How many windows in the queue have been filled? More...
 
bool QueueIsFull () const
 
WindowNth (int n)
 Access the queue, so you can inspect and modify any window in it. More...
 
WindowNewest ()
 
WindowLatest ()
 

Protected Attributes

const size_t mWindowSize
 
const size_t mSpectrumSize
 
const unsigned mStepsPerWindow
 
const size_t mStepSize
 
const bool mLeadingPadding
 
const bool mTrailingPadding
 

Private Member Functions

void ResizeQueue (size_t queueLength)
 
void FillFirstWindow ()
 
void RotateWindows ()
 
void OutputStep ()
 

Private Attributes

std::vector< std::unique_ptr< Window > > mQueue
 
HFFT hFFT
 
sampleCount mInSampleCount = 0
 
sampleCount mOutStepCount = 0
 sometimes negative More...
 
size_t mInWavePos = 0
 
FloatVector mFFTBuffer
 These have size mWindowSize: More...
 
FloatVector mInWaveBuffer
 
FloatVector mOutOverlapBuffer
 
FloatVector mInWindow
 These have size mWindowSize, or 0 for rectangular window: More...
 
FloatVector mOutWindow
 
const bool mNeedsOutput
 

Detailed Description

A class that transforms a portion of a wave track (preserving duration) by applying Fourier transform, then modifying coefficients, then inverse Fourier transform and overlap-add to reconstruct.

The procedure that modifies coefficients can be varied, and can employ lookahead
and -behind to nearby windows. May also be used just to gather information without producing output.

Definition at line 35 of file SpectrumTransformer.h.

Member Typedef Documentation

◆ FloatVector

using SpectrumTransformer::FloatVector = std::vector<float>

Definition at line 39 of file SpectrumTransformer.h.

◆ WindowProcessor

Type of function that transforms windows in the queue.

Called repeatedly, with the newest window in the queue taken from input, and the last window of the queue about to be inverse-transformed for output.

Returns
false to abort processing.

Definition at line 45 of file SpectrumTransformer.h.

Constructor & Destructor Documentation

◆ SpectrumTransformer()

SpectrumTransformer::SpectrumTransformer ( bool  needsOutput,
eWindowFunctions  inWindowType,
eWindowFunctions  outWindowType,
size_t  windowSize,
unsigned  stepsPerWindow,
bool  leadingPadding,
bool  trailingPadding 
)
Precondition
!(inWindowType == eWinFuncRectangular && outWindowType eWinFuncRectangular)
windowSize % stepsPerWindow == 0
windowSize is a power of 2
Parameters
needsOutputWhether to do the inverse FFT
inWindowTypeUsed in FFT transform
outWindowTypeUsed in inverse FFT transform
windowSizemust be a power of 2
stepsPerWindowdetermines the overlap
leadingPaddingWhether to start the queue with windows that partially overlap the first full window of input samples
trailingPaddingWhether to stop the procedure after the last complete window of input is added to the queue

Definition at line 17 of file SpectrumTransformer.cpp.

22: mWindowSize{ windowSize }
23, mSpectrumSize{ 1 + mWindowSize / 2 }
24, mStepsPerWindow{ stepsPerWindow }
26, mLeadingPadding{ leadingPadding }
27, mTrailingPadding{ trailingPadding }
32, mNeedsOutput{ needsOutput }
33{
34 // Check preconditions
35
36 // Powers of 2 only!
37 wxASSERT(mWindowSize > 0 &&
38 0 == (mWindowSize & (mWindowSize - 1)));
39
40 wxASSERT(mWindowSize % mStepsPerWindow == 0);
41
42 wxASSERT(!(inWindowType == eWinFuncRectangular && outWindowType == eWinFuncRectangular));
43
44 // To do: check that inWindowType, outWindowType, and mStepsPerWindow
45 // are compatible for correct overlap-add reconstruction.
46
47 // Create windows as needed
48 if (inWindowType != eWinFuncRectangular) {
49 mInWindow.resize(mWindowSize);
50 std::fill(mInWindow.begin(), mInWindow.end(), 1.0f);
51 NewWindowFunc(inWindowType, mWindowSize, false, mInWindow.data());
52 }
53 if (outWindowType != eWinFuncRectangular) {
54 mOutWindow.resize(mWindowSize);
55 std::fill(mOutWindow.begin(), mOutWindow.end(), 1.0f);
56 NewWindowFunc(outWindowType, mWindowSize, false, mOutWindow.data());
57 }
58
59 // Must scale one or the other window so overlap-add
60 // comes out right
61 double denom = 0;
62 for (size_t ii = 0; ii < mWindowSize; ii += mStepSize) {
63 denom +=
64 (mInWindow.empty() ? 1.0 : mInWindow[ii])
65 *
66 (mOutWindow.empty() ? 1.0 : mOutWindow[ii]);
67 }
68 // It is ASSUMED that you have chosen window types and
69 // steps per window, so that this sum denom would be the
70 // same, starting the march anywhere from 0 to mStepSize - 1.
71 // Else, your overlap-add won't be right, and the transformer
72 // might not be an identity even when you do nothing to the
73 // spectra.
74
75 float *pWindow = 0;
76 if (!mInWindow.empty())
77 pWindow = mInWindow.data();
78 else if (!mOutWindow.empty())
79 pWindow = mOutWindow.data();
80 else
81 // Can only happen if both window types were rectangular
82 wxASSERT(false);
83 for (size_t ii = 0; ii < mWindowSize; ++ii)
84 *pWindow++ /= denom;
85}
void NewWindowFunc(int whichFunction, size_t NumSamplesIn, bool extraSample, float *in)
Definition: FFT.cpp:368
@ eWinFuncRectangular
Definition: FFT.h:111
HFFT GetFFT(size_t fftlen)
Definition: RealFFTf.cpp:104
FloatVector mFFTBuffer
These have size mWindowSize:
const unsigned mStepsPerWindow
FloatVector mInWindow
These have size mWindowSize, or 0 for rectangular window:

References eWinFuncRectangular, mInWindow, mOutWindow, mStepSize, mStepsPerWindow, mWindowSize, and NewWindowFunc().

Here is the call graph for this function:

◆ ~SpectrumTransformer()

SpectrumTransformer::~SpectrumTransformer ( )
virtualdefault

Member Function Documentation

◆ CurrentQueueSize()

size_t SpectrumTransformer::CurrentQueueSize ( ) const

How many windows in the queue have been filled?

(Not always the allocated size of the queue)

Definition at line 265 of file SpectrumTransformer.cpp.

266{
267 auto allocSize = mQueue.size();
268 auto size = mOutStepCount + allocSize;
269 if (mLeadingPadding)
270 size += mStepsPerWindow - 1;
271
272 if (size < allocSize)
273 return size.as_size_t();
274 else
275 return allocSize;
276}
sampleCount mOutStepCount
sometimes negative
std::vector< std::unique_ptr< Window > > mQueue

References mLeadingPadding, mOutStepCount, mQueue, mStepsPerWindow, and size.

Referenced by EffectNoiseReduction::Worker::ReduceNoise().

Here is the caller graph for this function:

◆ DoFinish()

bool SpectrumTransformer::DoFinish ( )
virtual

Called after the last call to ProcessWindow().

Returns
false to abort processing. Default implementation just returns true.

Reimplemented in MyTransformer, SpectralDataManager::Worker, and TrackSpectrumTransformer.

Definition at line 98 of file SpectrumTransformer.cpp.

99{
100 return true;
101}

Referenced by TrackSpectrumTransformer::DoFinish(), and Finish().

Here is the caller graph for this function:

◆ DoOutput()

virtual void SpectrumTransformer::DoOutput ( const float *  outBuffer,
size_t  mStepSize 
)
pure virtual

Called within ProcessSamples if output was requested.

Implemented in TrackSpectrumTransformer.

Referenced by OutputStep().

Here is the caller graph for this function:

◆ DoStart()

bool SpectrumTransformer::DoStart ( )
virtual

Called before any calls to ProcessWindow.

More queue initializations can be done here.

Returns
false to abort processing. Default implementation just returns true.

Reimplemented in MyTransformer, SpectralDataManager::Worker, and TrackSpectrumTransformer.

Definition at line 93 of file SpectrumTransformer.cpp.

94{
95 return true;
96}

Referenced by TrackSpectrumTransformer::DoStart(), and Start().

Here is the caller graph for this function:

◆ FillFirstWindow()

void SpectrumTransformer::FillFirstWindow ( )
private

Definition at line 201 of file SpectrumTransformer.cpp.

202{
203 // Transform samples to frequency domain, windowed as needed
204 {
205 auto pFFTBuffer = mFFTBuffer.data(), pInWaveBuffer = mInWaveBuffer.data();
206 if (mInWindow.size() > 0) {
207 auto pInWindow = mInWindow.data();
208 for (size_t ii = 0; ii < mWindowSize; ++ii)
209 *pFFTBuffer++ = *pInWaveBuffer++ * *pInWindow++;
210 }
211 else
212 memmove(pFFTBuffer, pInWaveBuffer, mWindowSize * sizeof(float));
213 }
214 RealFFTf(mFFTBuffer.data(), hFFT.get());
215
216 auto &record = Nth(0);
217
218 // Store real and imaginary parts for later inverse FFT
219 {
220 float *pReal = &record.mRealFFTs[1];
221 float *pImag = &record.mImagFFTs[1];
222 int *pBitReversed = &hFFT->BitReversed[1];
223 const auto last = mSpectrumSize - 1;
224 for (size_t ii = 1; ii < last; ++ii) {
225 const int kk = *pBitReversed++;
226 *pReal++ = mFFTBuffer[kk];
227 *pImag++ = mFFTBuffer[kk + 1];
228 }
229 // DC and Fs/2 bins need to be handled specially
230 const float dc = mFFTBuffer[0];
231 record.mRealFFTs[0] = dc;
232
233 const float nyquist = mFFTBuffer[1];
234 record.mImagFFTs[0] = nyquist; // For Fs/2, not really imaginary
235 }
236}
void RealFFTf(fft_type *buffer, const FFTParam *h)
Definition: RealFFTf.cpp:161
Window & Nth(int n)
Access the queue, so you can inspect and modify any window in it.

References hFFT, mFFTBuffer, mInWaveBuffer, mInWindow, mSpectrumSize, mWindowSize, Nth(), and RealFFTf().

Referenced by ProcessSamples().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Finish()

bool SpectrumTransformer::Finish ( const WindowProcessor processor)

Call once after a sequence of calls to ProcessSamples; flushes the queue and Invokes DoFinish

Returns
success

Definition at line 243 of file SpectrumTransformer.cpp.

244{
245 bool bLoopSuccess = true;
246 if (mTrailingPadding) {
247 // Keep flushing empty input buffers through the history
248 // windows until we've output exactly as many samples as
249 // were input.
250 // Well, not exactly, but not more than one step-size of extra samples
251 // at the end.
252
253 while (bLoopSuccess &&
254 mOutStepCount * static_cast<int>(mStepSize) < mInSampleCount)
255 bLoopSuccess = ProcessSamples(processor, nullptr, mStepSize);
256 }
257
258 if (bLoopSuccess)
259 // invoke derived method
260 bLoopSuccess = DoFinish();
261
262 return bLoopSuccess;
263}
bool ProcessSamples(const WindowProcessor &processor, const float *buffer, size_t len)
Call multiple times.
virtual bool DoFinish()
Called after the last call to ProcessWindow().

References DoFinish(), mInSampleCount, mOutStepCount, mStepSize, mTrailingPadding, and ProcessSamples().

Referenced by TrackSpectrumTransformer::Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Latest()

Window & SpectrumTransformer::Latest ( )
inline

Definition at line 146 of file SpectrumTransformer.h.

146{ return **mQueue.rbegin(); }

References mQueue.

◆ NeedsOutput()

bool SpectrumTransformer::NeedsOutput ( ) const
inline

Definition at line 67 of file SpectrumTransformer.h.

67{ return mNeedsOutput; }

References mNeedsOutput.

◆ Newest()

Window & SpectrumTransformer::Newest ( )
inline

Definition at line 145 of file SpectrumTransformer.h.

145{ return **mQueue.begin(); }

References mQueue.

◆ NewWindow()

auto SpectrumTransformer::NewWindow ( size_t  windowSize)
virtual

Allocates a window to place in the queue.

Only when initializing – windows are recycled thereafter. You can derive from Window to add fields, and then override this factory function.

Reimplemented in MyTransformer, and SpectralDataManager::Worker.

Definition at line 87 of file SpectrumTransformer.cpp.

89{
90 return std::make_unique<Window>(windowSize);
91}

Referenced by ResizeQueue().

Here is the caller graph for this function:

◆ Nth()

Window & SpectrumTransformer::Nth ( int  n)
inline

Access the queue, so you can inspect and modify any window in it.

Newer windows are at earlier indices. You can't modify the length of it

Definition at line 143 of file SpectrumTransformer.h.

143{ return *mQueue[n]; }

References mQueue.

Referenced by FillFirstWindow(), and SpectralDataManager::Worker::NthWindow().

Here is the caller graph for this function:

◆ OutputStep()

void SpectrumTransformer::OutputStep ( )
private

Definition at line 279 of file SpectrumTransformer.cpp.

280{
281 if (!mNeedsOutput)
282 return;
283 if (QueueIsFull()) {
284 const auto last = mSpectrumSize - 1;
285 Window &record = **mQueue.rbegin();
286
287 const float *pReal = &record.mRealFFTs[1];
288 const float *pImag = &record.mImagFFTs[1];
289 float *pBuffer = &mFFTBuffer[2];
290 auto nn = mSpectrumSize - 2;
291 for (; nn--;) {
292 *pBuffer++ = *pReal++;
293 *pBuffer++ = *pImag++;
294 }
295 mFFTBuffer[0] = record.mRealFFTs[0];
296 // The Fs/2 component is stored as the imaginary part of the DC component
297 mFFTBuffer[1] = record.mImagFFTs[0];
298
299 // Invert the FFT into the output buffer
300 InverseRealFFTf(mFFTBuffer.data(), hFFT.get());
301
302 // Overlap-add
303 if (mOutWindow.size() > 0) {
304 auto pOut = mOutOverlapBuffer.data();
305 auto pWindow = mOutWindow.data();
306 auto pBitReversed = &hFFT->BitReversed[0];
307 for (size_t jj = 0; jj < last; ++jj) {
308 auto kk = *pBitReversed++;
309 *pOut++ += mFFTBuffer[kk] * (*pWindow++);
310 *pOut++ += mFFTBuffer[kk + 1] * (*pWindow++);
311 }
312 }
313 else {
314 auto pOut = mOutOverlapBuffer.data();
315 auto pBitReversed = &hFFT->BitReversed[0];
316 for (size_t jj = 0; jj < last; ++jj) {
317 auto kk = *pBitReversed++;
318 *pOut++ += mFFTBuffer[kk];
319 *pOut++ += mFFTBuffer[kk + 1];
320 }
321 }
322 auto buffer = mOutOverlapBuffer.data();
323 if (mOutStepCount >= 0) {
324 // Output the first portion of the overlap buffer, they're done
325 DoOutput(buffer, mStepSize);
326 }
327 // Shift the remainder over.
328 memmove(buffer, buffer + mStepSize, sizeof(float)*(mWindowSize - mStepSize));
329 std::fill(buffer + mWindowSize - mStepSize, buffer + mWindowSize, 0.0f);
330 }
331}
void InverseRealFFTf(fft_type *buffer, const FFTParam *h)
Definition: RealFFTf.cpp:263
virtual void DoOutput(const float *outBuffer, size_t mStepSize)=0
Called within ProcessSamples if output was requested.

References DoOutput(), hFFT, InverseRealFFTf(), mFFTBuffer, SpectrumTransformer::Window::mImagFFTs, mNeedsOutput, mOutOverlapBuffer, mOutStepCount, mOutWindow, mQueue, SpectrumTransformer::Window::mRealFFTs, mSpectrumSize, mStepSize, mWindowSize, and QueueIsFull().

Referenced by ProcessSamples().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessSamples()

bool SpectrumTransformer::ProcessSamples ( const WindowProcessor processor,
const float *  buffer,
size_t  len 
)

Call multiple times.

Parameters
buffernull if flushing the end
Returns
success

Definition at line 153 of file SpectrumTransformer.cpp.

155{
156 if (buffer)
157 mInSampleCount += len;
158 bool success = true;
159 while (success && len &&
160 mOutStepCount * static_cast<int>(mStepSize) < mInSampleCount) {
161 auto avail = std::min(len, mWindowSize - mInWavePos);
162 if (buffer)
163 memmove(&mInWaveBuffer[mInWavePos], buffer, avail * sizeof(float));
164 else
165 memset(&mInWaveBuffer[mInWavePos], 0, avail * sizeof(float));
166 if (buffer)
167 buffer += avail;
168 len -= avail;
169 mInWavePos += avail;
170
171 if (mInWavePos == mWindowSize) {
173
174 // invoke derived method
175 if ( (success = processor(*this)), success )
176 OutputStep();
177
180
181 // Shift input.
182 memmove(mInWaveBuffer.data(), &mInWaveBuffer[mStepSize],
183 (mWindowSize - mStepSize) * sizeof(float));
185 }
186 }
187
188 return success;
189}
int min(int a, int b)

References FillFirstWindow(), min(), mInSampleCount, mInWaveBuffer, mInWavePos, mOutStepCount, mStepSize, mWindowSize, OutputStep(), and RotateWindows().

Referenced by Finish(), and TrackSpectrumTransformer::Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QueueIsFull()

bool SpectrumTransformer::QueueIsFull ( ) const

Whether the last window in the queue overlapped the input at least partially and its coefficients will affect output.

Definition at line 333 of file SpectrumTransformer.cpp.

334{
335 if (mLeadingPadding)
336 return (mOutStepCount >= -static_cast<int>(mStepsPerWindow - 1));
337 else
338 return (mOutStepCount >= 0);
339}

References mLeadingPadding, mOutStepCount, and mStepsPerWindow.

Referenced by OutputStep(), and EffectNoiseReduction::Worker::ReduceNoise().

Here is the caller graph for this function:

◆ ResizeQueue()

void SpectrumTransformer::ResizeQueue ( size_t  queueLength)
private

Definition at line 191 of file SpectrumTransformer.cpp.

192{
193 int oldLen = mQueue.size();
194 mQueue.resize(queueLength);
195 for (size_t ii = oldLen; ii < queueLength; ++ii)
196 // invoke derived method to get a queue element
197 // with appropriate extra fields
199}
virtual std::unique_ptr< Window > NewWindow(size_t windowSize)
Allocates a window to place in the queue.

References mQueue, mWindowSize, and NewWindow().

Referenced by Start().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RotateWindows()

void SpectrumTransformer::RotateWindows ( )
private

Definition at line 238 of file SpectrumTransformer.cpp.

239{
240 std::rotate(mQueue.begin(), mQueue.end() - 1, mQueue.end());
241}
void rotate(const float *oldPhase, const float *newPhase, std::complex< float > *dst, int32_t n)
Definition: VectorOps.h:140

References mQueue, and staffpad::vo::rotate().

Referenced by ProcessSamples().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Start()

bool SpectrumTransformer::Start ( size_t  queueLength)

Call once before a sequence of calls to ProcessSamples; Invokes DoStart.

Returns
success

Definition at line 109 of file SpectrumTransformer.cpp.

110{
111 // Prepare clean queue
112 ResizeQueue(queueLength);
113 for (auto &pWindow : mQueue)
114 pWindow->Zero();
115
116 // invoke derived method
117 if (!DoStart())
118 return false;
119
120 // Clean input and output buffers
121 {
122 float *pFill;
123 pFill = mInWaveBuffer.data();
124 std::fill(pFill, pFill + mWindowSize, 0.0f);
125 pFill = mOutOverlapBuffer.data();
126 std::fill(pFill, pFill + mWindowSize, 0.0f);
127 }
128
129 if (!mLeadingPadding)
130 {
131 // We do not want leading zero padded windows
132 mInWavePos = 0;
133 mOutStepCount = -static_cast<int>(queueLength - 1);
134 }
135 else
136 {
137 // So that the queue gets primed with some windows,
138 // zero-padded in front, the first having mStepSize
139 // samples of wave data:
141 // This starts negative, to count up until the queue fills:
142 mOutStepCount = -static_cast<int>(queueLength - 1)
143 // ... and then must pass over the padded windows,
144 // before the first full window:
145 - static_cast<int>(mStepsPerWindow - 1);
146 }
147
148 mInSampleCount = 0;
149
150 return true;
151}
void ResizeQueue(size_t queueLength)
virtual bool DoStart()
Called before any calls to ProcessWindow.

References DoStart(), mInSampleCount, mInWaveBuffer, mInWavePos, mLeadingPadding, mOutOverlapBuffer, mOutStepCount, mQueue, mStepSize, mStepsPerWindow, mWindowSize, and ResizeQueue().

Referenced by TrackSpectrumTransformer::Process().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TotalQueueSize()

size_t SpectrumTransformer::TotalQueueSize ( ) const
inline

Useful functions to implement WindowProcesser:

How many windows in the queue have been allocated?

Definition at line 131 of file SpectrumTransformer.h.

131{ return mQueue.size(); }

References mQueue.

Member Data Documentation

◆ hFFT

HFFT SpectrumTransformer::hFFT
private

Definition at line 167 of file SpectrumTransformer.h.

Referenced by FillFirstWindow(), and OutputStep().

◆ mFFTBuffer

FloatVector SpectrumTransformer::mFFTBuffer
private

These have size mWindowSize:

Definition at line 173 of file SpectrumTransformer.h.

Referenced by FillFirstWindow(), and OutputStep().

◆ mInSampleCount

sampleCount SpectrumTransformer::mInSampleCount = 0
private

Definition at line 168 of file SpectrumTransformer.h.

Referenced by Finish(), ProcessSamples(), and Start().

◆ mInWaveBuffer

FloatVector SpectrumTransformer::mInWaveBuffer
private

Definition at line 174 of file SpectrumTransformer.h.

Referenced by FillFirstWindow(), ProcessSamples(), and Start().

◆ mInWavePos

size_t SpectrumTransformer::mInWavePos = 0
private

Definition at line 170 of file SpectrumTransformer.h.

Referenced by ProcessSamples(), and Start().

◆ mInWindow

FloatVector SpectrumTransformer::mInWindow
private

These have size mWindowSize, or 0 for rectangular window:

Definition at line 177 of file SpectrumTransformer.h.

Referenced by FillFirstWindow(), and SpectrumTransformer().

◆ mLeadingPadding

const bool SpectrumTransformer::mLeadingPadding
protected

Definition at line 161 of file SpectrumTransformer.h.

Referenced by CurrentQueueSize(), QueueIsFull(), and Start().

◆ mNeedsOutput

const bool SpectrumTransformer::mNeedsOutput
private

Definition at line 180 of file SpectrumTransformer.h.

Referenced by NeedsOutput(), and OutputStep().

◆ mOutOverlapBuffer

FloatVector SpectrumTransformer::mOutOverlapBuffer
private

Definition at line 175 of file SpectrumTransformer.h.

Referenced by OutputStep(), and Start().

◆ mOutStepCount

sampleCount SpectrumTransformer::mOutStepCount = 0
private

sometimes negative

Definition at line 169 of file SpectrumTransformer.h.

Referenced by CurrentQueueSize(), Finish(), OutputStep(), ProcessSamples(), QueueIsFull(), and Start().

◆ mOutWindow

FloatVector SpectrumTransformer::mOutWindow
private

Definition at line 178 of file SpectrumTransformer.h.

Referenced by OutputStep(), and SpectrumTransformer().

◆ mQueue

std::vector<std::unique_ptr<Window> > SpectrumTransformer::mQueue
private

◆ mSpectrumSize

const size_t SpectrumTransformer::mSpectrumSize
protected

Definition at line 156 of file SpectrumTransformer.h.

Referenced by FillFirstWindow(), and OutputStep().

◆ mStepSize

const size_t SpectrumTransformer::mStepSize
protected

◆ mStepsPerWindow

const unsigned SpectrumTransformer::mStepsPerWindow
protected

Definition at line 158 of file SpectrumTransformer.h.

Referenced by CurrentQueueSize(), QueueIsFull(), SpectrumTransformer(), and Start().

◆ mTrailingPadding

const bool SpectrumTransformer::mTrailingPadding
protected

Definition at line 163 of file SpectrumTransformer.h.

Referenced by Finish().

◆ mWindowSize

const size_t SpectrumTransformer::mWindowSize
protected

The documentation for this class was generated from the following files: