Jamba
3.0.2
|
#include <RTState.h>
Inherits pongasoft::VST::IMessageHandler.
Public Member Functions | |
RTRawVstParam | add (RawVstParam iParamDef) |
template<typename T > | |
RTVstParam< T > | add (VstParam< T > iParamDef) |
template<typename T > | |
RTJmbInParam< T > | addJmbIn (JmbParam< T > iParamDef) |
template<typename T > | |
RTJmbOutParam< T > | addJmbOut (JmbParam< T > iParamDef) |
virtual void | afterProcessing () |
virtual bool | applyParameterChanges (IParameterChanges &inputParameterChanges) |
virtual bool | beforeProcessing () |
std::vector< ParamID > const & | getAllRegistrationOrder () const |
virtual int32 | getParamUpdateSampleOffset (ProcessData &iData, ParamID iParamID) |
tresult | handleMessage (Message const &iMessage) override |
virtual tresult | init () |
bool | isMessagingEnabled () const |
virtual tresult | readNewState (IBStreamer &iStreamer) |
RTState (Parameters const &iParameters) | |
virtual tresult | sendPendingMessages (IMessageProducer *iMessageProducer) |
virtual tresult | writeLatestState (IBStreamer &oStreamer) |
Protected Member Functions | |
tresult | addInboundMessagingParameter (std::unique_ptr< IRTJmbInParameter > iParameter) |
tresult | addOutboundMessagingParameter (std::unique_ptr< IRTJmbOutParameter > iParameter) |
tresult | addRawParameter (std::unique_ptr< RTRawVstParameter > iParameter) |
virtual void | afterReadNewState (NormalizedState const *iState) |
virtual void | beforeWriteNewState (NormalizedState const *iState) |
virtual void | computeLatestState (NormalizedState *oLatestState) const |
virtual bool | onNewState (NormalizedState const *iLatestState) |
virtual bool | resetPreviousValues () |
Protected Attributes | |
std::vector< ParamID > | fAllRegistrationOrder {} |
std::map< ParamID, std::unique_ptr< IRTJmbInParameter > > | fInboundMessagingParameters {} |
MessageHandler | fMessageHandler {} |
std::map< ParamID, std::unique_ptr< IRTJmbOutParameter > > | fOutboundMessagingParameters {} |
Parameters const & | fPluginParameters |
std::map< ParamID, std::unique_ptr< RTRawVstParameter > > | fVstParameters {} |
Private Member Functions | |
void | computeLatestState () |
Private Attributes | |
Concurrent::LockFree::AtomicValue< NormalizedState > | fLatestState |
Concurrent::LockFree::SingleElementQueue< NormalizedState > | fStateUpdate |
Friends | |
class | Debug::ParamDisplay |
Manages the state used by the processor: you add all the parameters that the state manages using the add method. Combined with the RTProcessor class, everything will be handled for you (reading/writing the state, updating previous value, etc...).
|
explicit |
RTRawVstParam pongasoft::VST::RT::RTState::add | ( | RawVstParam | iParamDef | ) |
This method is called for each parameter managed by RTState. The order in which this method is called is important and reflects the order that will be used when reading/writing state to the stream
RTVstParam< T > pongasoft::VST::RT::RTState::add | ( | VstParam< T > | iParamDef | ) |
This method is called for each parameter managed by RTState. The order in which this method is called is important and reflects the order that will be used when reading/writing state to the stream
|
protected |
RTJmbInParam< T > pongasoft::VST::RT::RTState::addJmbIn | ( | JmbParam< T > | iParamDef | ) |
This method should be called to add an rt inbound jmb parameter
RTJmbOutParam< T > pongasoft::VST::RT::RTState::addJmbOut | ( | JmbParam< T > | iParamDef | ) |
This method should be called to add an rt outbound jmb parameter
|
protected |
|
protected |
|
virtual |
This method should be called at the end of process(ProcessData &data) method. It will update the previous state to the current one and save the latest changes (if necessary) so that it is accessible via writeLatestState.
|
inlineprotectedvirtual |
Gives a chance to subclasses to tweak and/or display the state after being read
|
virtual |
This method should be called in every frame when there are parameter changes to update this state accordingly
|
virtual |
This method should be call at the beginning of the process(ProcessData &data) method before doing anything else. The goal of this method is to update the current state with a state set by the UI (typical use case is to initialize the plugin when being loaded)
|
inlineprotectedvirtual |
Gives a chance to subclasses to tweak and/or display the state before being written
|
protectedvirtual |
Called from the RT thread from afterProcessing to compute the latest state. Can be overridden
|
private |
|
inline |
|
virtual |
This uses the same algorithm as when the param value is updated (implemented in applyParameterChanges) for consistency. If the param changes more than once in a frame, only the last value is taken into account.
|
overridevirtual |
Called by the UI thread (from RTProcessor) to handle messages.
Implements pongasoft::VST::IMessageHandler.
|
virtual |
Call this method after adding all the parameters. If using the RT processor, it will happen automatically.
|
inline |
|
protectedvirtual |
Called from the RT thread from beforeProcessing to set the new state. Can be overridden
|
virtual |
This method should be called from Processor::setState to update this state to the state stored in the stream. Note that this method is called from the UI thread so the update is queued until the next frame.
|
protectedvirtual |
Called from the RT thread from afterProcessing to reset previous values (copy current value to previous). Can be overridden.
|
virtual |
|
virtual |
This method should be called from Processor::getState to store the latest state to the stream. Note that this method is called from the UI thread and gets the "latest" state as of the end of the last frame.
|
friend |
|
protected |
|
protected |
|
private |
|
protected |
|
protected |
|
protected |
|
private |
|
protected |