Audacity 3.2.0
|
Classes | |
struct | MyWindow |
Public Member Functions | |
MyTransformer (NoiseReductionBase::Worker &worker, WaveChannel *pOutputTrack, bool needsOutput, eWindowFunctions inWindowType, eWindowFunctions outWindowType, size_t windowSize, unsigned stepsPerWindow, bool leadingPadding, bool trailingPadding) | |
MyWindow & | NthWindow (int nn) |
std::unique_ptr< Window > | NewWindow (size_t windowSize) override |
Allocates a window to place in the queue. More... | |
bool | DoStart () override |
Called before any calls to ProcessWindow. More... | |
bool | DoFinish () override |
Called after the last call to ProcessWindow(). More... | |
Public Member Functions inherited from TrackSpectrumTransformer | |
TrackSpectrumTransformer (WaveChannel *pOutputTrack, bool needsOutput, eWindowFunctions inWindowType, eWindowFunctions outWindowType, size_t windowSize, unsigned stepsPerWindow, bool leadingPadding, bool trailingPadding) | |
~TrackSpectrumTransformer () override | |
bool | Process (const WindowProcessor &processor, const WaveChannel &channel, size_t queueLength, sampleCount start, sampleCount len) |
Invokes Start(), ProcessSamples(), and Finish() More... | |
Public Member Functions inherited from SpectrumTransformer | |
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< Window > | NewWindow (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 |
Window & | Nth (int n) |
Access the queue, so you can inspect and modify any window in it. More... | |
Window & | Newest () |
Window & | Latest () |
Public Attributes | |
NoiseReductionBase::Worker & | mWorker |
Additional Inherited Members | |
Public Types inherited from SpectrumTransformer | |
using | FloatVector = std::vector< float > |
using | WindowProcessor = std::function< bool(SpectrumTransformer &) > |
Type of function that transforms windows in the queue. More... | |
Static Public Member Functions inherited from TrackSpectrumTransformer | |
static bool | PostProcess (WaveTrack &outputTrack, sampleCount len) |
Final flush and trimming of tail samples. More... | |
Protected Member Functions inherited from TrackSpectrumTransformer | |
bool | DoStart () override |
Called before any calls to ProcessWindow. More... | |
void | DoOutput (const float *outBuffer, size_t mStepSize) override |
bool | DoFinish () override |
Called after the last call to ProcessWindow(). More... | |
Protected Attributes inherited from SpectrumTransformer | |
const size_t | mWindowSize |
const size_t | mSpectrumSize |
const unsigned | mStepsPerWindow |
const size_t | mStepSize |
const bool | mLeadingPadding |
const bool | mTrailingPadding |
Definition at line 185 of file NoiseReductionBase.cpp.
|
inline |
Definition at line 187 of file NoiseReductionBase.cpp.
|
overridevirtual |
Called after the last call to ProcessWindow().
Reimplemented from SpectrumTransformer.
Definition at line 1079 of file NoiseReductionBase.cpp.
References TrackSpectrumTransformer::DoFinish().
|
overridevirtual |
Called before any calls to ProcessWindow.
More queue initializations can be done here.
Reimplemented from SpectrumTransformer.
Definition at line 758 of file NoiseReductionBase.cpp.
References TrackSpectrumTransformer::DoStart(), MyTransformer::MyWindow::mGains, and MyTransformer::MyWindow::mSpectrums.
|
overridevirtual |
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 from SpectrumTransformer.
Definition at line 455 of file NoiseReductionBase.cpp.
|
inline |
Definition at line 213 of file NoiseReductionBase.cpp.
Referenced by NoiseReductionBase::Worker::Classify(), NoiseReductionBase::Worker::GatherStatistics(), and NoiseReductionBase::Worker::ReduceNoise().
NoiseReductionBase::Worker& MyTransformer::mWorker |
Definition at line 221 of file NoiseReductionBase.cpp.
Referenced by NoiseReductionBase::Worker::Processor().