Krotos Modules 3
Loading...
Searching...
No Matches
krotos::Convolver Class Reference

#include <Convolver.h>

Inheritance diagram for krotos::Convolver:
fftconvolver::TwoStageFFTConvolver

Public Member Functions

 Convolver ()
 
virtual ~Convolver ()
 
- Public Member Functions inherited from fftconvolver::TwoStageFFTConvolver
 TwoStageFFTConvolver ()
 
virtual ~TwoStageFFTConvolver ()
 
bool init (size_t headBlockSize, size_t tailBlockSize, const Sample *ir, size_t irLen)
 Initialization the convolver.
 
void process (const Sample *input, Sample *output, size_t len)
 Convolves the the given input samples and immediately outputs the result.
 
void reset ()
 Resets the convolver and discards the set impulse response.
 

Protected Member Functions

virtual void startBackgroundProcessing ()
 Method called by the convolver if work for background processing is available.
 
virtual void waitForBackgroundProcessing ()
 Called by the convolver if it expects the result of its previous call to startBackgroundProcessing()
 
- Protected Member Functions inherited from fftconvolver::TwoStageFFTConvolver
void doBackgroundProcessing ()
 Actually performs the background processing work.
 

Private Attributes

std::unique_ptr< juce::Thread > m_thread
 
std::atomic< uint32 > m_backgroundProcessingFinished
 
WaitableEvent m_backgroundProcessingFinishedEvent
 

Friends

class ConvolverBackgroundThread
 

Constructor & Destructor Documentation

◆ Convolver()

krotos::Convolver::Convolver ( )

◆ ~Convolver()

krotos::Convolver::~Convolver ( )
virtual

Member Function Documentation

◆ startBackgroundProcessing()

void krotos::Convolver::startBackgroundProcessing ( )
protectedvirtual

Method called by the convolver if work for background processing is available.

The default implementation just calls doBackgroundProcessing() to perform the "bulk" convolution. However, if you want to perform the majority of work in some background thread (which is recommended), you can overload this method and trigger the execution of doBackgroundProcessing() really in some background thread.

Reimplemented from fftconvolver::TwoStageFFTConvolver.

◆ waitForBackgroundProcessing()

void krotos::Convolver::waitForBackgroundProcessing ( )
protectedvirtual

Called by the convolver if it expects the result of its previous call to startBackgroundProcessing()

After returning from this method, all background processing has to be completed.

Reimplemented from fftconvolver::TwoStageFFTConvolver.

Friends And Related Symbol Documentation

◆ ConvolverBackgroundThread

friend class ConvolverBackgroundThread
friend

Member Data Documentation

◆ m_backgroundProcessingFinished

std::atomic<uint32> krotos::Convolver::m_backgroundProcessingFinished
private

◆ m_backgroundProcessingFinishedEvent

WaitableEvent krotos::Convolver::m_backgroundProcessingFinishedEvent
private

◆ m_thread

std::unique_ptr<juce::Thread> krotos::Convolver::m_thread
private

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