This object acts as global pool for all samples used in an instance of the pluginIt uses reference counting to decide if a sound is used. More...
Public Member Functions | |
size_t | getMemoryUsageForAllSamples () const noexcept |
Returns the memory usage for all sounds in the pool. More... | |
int | getNumSoundsInPool () const noexcept |
returns the number of sounds in the pool. More... | |
void | setDebugProcessor (Processor *p) |
call this with any processor to enable console output. More... | |
Public Member Functions inherited from SafeChangeBroadcaster | |
void | addChangeListener (SafeChangeListener *listener) |
Registers a listener to receive change callbacks from this broadcaster. More... | |
void | removeAllChangeListeners () |
Removes all listeners from the list. More... | |
void | removeChangeListener (SafeChangeListener *listener) |
Unregisters a listener from the list. More... | |
void | sendAllocationFreeChangeMessage () |
This will send a message without allocating a message slot. More... | |
void | sendChangeMessage (const String &=String()) |
Causes an asynchronous change message to be sent to all the registered listeners. More... | |
void | sendSynchronousChangeMessage () |
Sends a synchronous change message to all the registered listeners. More... | |
This object acts as global pool for all samples used in an instance of the plugin
It uses reference counting to decide if a sound is used.
If a sound is added more than once, it will not load it again, but pass a reference to the already loaded Sound.
This is achieved by isolating the actual sample data into a StreamingSamplerSound object which will be wrapped by a ModulatorSamplerSound object.
|
noexcept |
Returns the memory usage for all sounds in the pool.
This is not the exact amount of memory usage of the application, because every sampler has voices which have intermediate buffers, so the total memory footprint might be a few megabytes larger.
|
noexcept |
returns the number of sounds in the pool.
void setDebugProcessor | ( | Processor * | p | ) |
call this with any processor to enable console output.