OpenShot Library | OpenShotAudio  0.2.2
juce::dsp::Convolution::Pimpl Struct Reference

Manages all the changes requested by the main convolution engine, to minimize the number of calls of the convolution engine initialization, and the potential consequences of multiple quick calls to the function Convolution::loadImpulseResponse. More...

+ Inheritance diagram for juce::dsp::Convolution::Pimpl:

Public Types

enum class  ChangeRequest {
  changeEngine = 0 , changeSampleRate , changeMaximumBufferSize , changeSource ,
  changeImpulseResponseSize , changeStereo , changeTrimming , changeNormalisation ,
  changeIgnore , numChangeRequestTypes
}
 
using SourceType = ConvolutionEngine::ProcessingInformation::SourceType
 

Public Member Functions

void initProcessing (int maximumBufferSize)
 Inits the size of the interpolation buffer.
 
void addToFifo (ChangeRequest type, juce::var parameter)
 Adds a new change request.
 
void addToFifo (ChangeRequest *types, juce::var *parameters, int numEntries)
 Adds a new array of change requests.
 
void readFromFifo (ChangeRequest &type, juce::var &parameter)
 Reads requests from the fifo.
 
int getNumRemainingEntries () const noexcept
 Returns the number of requests that still need to be processed.
 
void processFifo ()
 This function processes all the change requests to remove all the the redundant ones, and to tell what kind of initialization must be done. More...
 
void copyBufferToTemporaryLocation (dsp::AudioBlock< float > block)
 This function copies a buffer to a temporary location, so that any external audio source can be processed then in the dedicated thread.
 
void reset ()
 Resets the convolution engines states.
 
void processSamples (const AudioBlock< const float > &input, AudioBlock< float > &output)
 Convolution processing handling interpolation between previous and new states of the convolution engines.
 

Public Attributes

const int64 maximumTimeInSamples = 10 * 96000
 

Detailed Description

Manages all the changes requested by the main convolution engine, to minimize the number of calls of the convolution engine initialization, and the potential consequences of multiple quick calls to the function Convolution::loadImpulseResponse.

Definition at line 337 of file juce_Convolution.cpp.

Member Function Documentation

◆ processFifo()

void juce::dsp::Convolution::Pimpl::processFifo ( )
inline

This function processes all the change requests to remove all the the redundant ones, and to tell what kind of initialization must be done.

Depending on the results, the convolution engines might be reset, or simply updated, or they might not need any change at all.

Definition at line 482 of file juce_Convolution.cpp.

References copyBufferToTemporaryLocation(), getNumRemainingEntries(), juce::Thread::isThreadRunning(), readFromFifo(), juce::AudioBuffer< Type >::setSample(), juce::AudioBuffer< Type >::setSize(), juce::Array< ElementType, TypeOfCriticalSectionToUse, minimumAllocatedSize >::setUnchecked(), and juce::Thread::startThread().

Referenced by processSamples(), and reset().


The documentation for this struct was generated from the following file: