|
Photosine 0.5
|
#include <PluginPool.h>
Classes | |
| struct | Reservation |
Public Member Functions | |
| PluginPool () | |
| ~PluginPool () | |
| void | initialize (int numThreads, int numChannels, juce::ValueTree valueTreeToLoad) |
| bool | isInitialized () |
| Reservation | getNextReservation () |
| void | releaseReservation (Reservation arrayToRelease) |
Private Member Functions | |
| JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginPool) | |
Private Attributes | |
| juce::OwnedArray< juce::OwnedArray< juce::OwnedArray< juce::AudioPluginInstance > > > | internalPool |
| std::mutex | internalPoolMutex |
| juce::Array< int > | freeIndexes |
| std::mutex | freeIndexesMutex |
| std::condition_variable | freeIndexesCv |
| int | maxThreads |
| int | channels |
| bool | pluginsFree = true |
| juce::ValueTree | pluginListTree |
| bool | pluginPoolPrepared = false |
Manages a pool of plugin instances in order to reduce the performance cost of creating a new instance per process. Instances are accessed by getting a PluginPool::Reservation via getNextReservation(). When a reservation is done being used, it should be released via releaseReservation().
internalPool structure:
| ImageProcessing::PluginPool::PluginPool | ( | ) |
| ImageProcessing::PluginPool::~PluginPool | ( | ) |
| ImageProcessing::PluginPool::Reservation ImageProcessing::PluginPool::getNextReservation | ( | ) |
Creates and returns a new reservation.
| void ImageProcessing::PluginPool::initialize | ( | int | numThreads, |
| int | numChannels, | ||
| juce::ValueTree | valueTreeToLoad ) |
Creates plugin instances for a plugin list value tree.
| numThreads | The total number of Reservations that will be allowed at one time. Or the amount of multiples of valueTreeToLoad |
| numChannels | The total number of instances that should be made per plugin per list. |
| valueTreeToLoad | A value tree representing a plugin list. |
| bool ImageProcessing::PluginPool::isInitialized | ( | ) |
Returns true if initialize() has been called already.
|
private |
| void ImageProcessing::PluginPool::releaseReservation | ( | Reservation | arrayToRelease | ) |
Releases a reservation which was previously acquired via getNextReservation().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |