Node¶
Base class for Amplimix pipeline nodes.
Detailed Description¶
This class presents the basic structure to create Amplimix pipeline nodes. Each Node of your pipelines must be derived from this class and implement the CreateInstance() method.
See also: NodeInstance
Public Functions¶
| Type | Name |
|---|---|
| virtual bool | CanConsume () const = 0 Returns true if the node can consume audio data. |
| virtual bool | CanProduce () const = 0 Returns true if the node can produce audio data. |
| virtual std::shared_ptr< NodeInstance > | CreateInstance () const = 0 Creates a new instance of the node. |
| virtual AmSize | GetMaxInputCount () const = 0 Returns the maximum number of input connections the node can have. |
| virtual AmSize | GetMinInputCount () const = 0 Returns the minimum number of input connections the node can have. |
| const AmString & | GetName () const Returns the name of the node. |
| virtual AmSize | GetParameterCount () const Returns the number of parameters accepted by this node. |
| virtual AmReal32 | GetParameterMax (AmSize index) const Gets the maximum allowed value of the parameter at the given index. |
| virtual AmReal32 | GetParameterMin (AmSize index) const Gets the minimum allowed value of the parameter at the given index. |
| virtual AmString | GetParameterName (AmSize index) const Gets the name of the parameter at the given index. |
| virtual eParameterType | GetParameterType (AmSize index) const Gets the type of the parameter at the given index. |
| Node (AmString name) Node constructor. | |
| virtual | ~Node () Node destructor. |
Public Static Functions¶
| Type | Name |
|---|---|
| std::shared_ptr< NodeInstance > | Construct (const AmString & name) Creates a new instance of the node with the given name and returns its pointer. |
| std::shared_ptr< Node > | Find (const AmString & name) Look up a node by name. |
| const std::map< AmString, std::shared_ptr< Node > > & | GetRegistry () Gets the list of registered nodes. |
| void | LockRegistry () Locks the nodes' registry. |
| void | Register (std::shared_ptr< Node > node) Registers a new node. |
| void | UnlockRegistry () Unlocks the nodes' registry. |
| void | Unregister (std::shared_ptr< const Node > node) Unregisters a node. |
Protected Attributes¶
| Type | Name |
|---|---|
| AmString | m_name The name of this node. |
Public Functions Documentation¶
CanConsume
Returns true if the node can consume audio data.
Returns:
true if the node can consume audio data, false otherwise.
CanProduce
Returns true if the node can produce audio data.
Returns:
true if the node can produce audio data, false otherwise.
CreateInstance
Creates a new instance of the node.
Returns:
A new instance of the node.
GetMaxInputCount
Returns the maximum number of input connections the node can have.
Returns:
The maximum number of input connections the node can have.
GetMinInputCount
Returns the minimum number of input connections the node can have.
Returns:
The minimum number of input connections the node can have.
GetParameterCount
Returns the number of parameters accepted by this node.
Returns:
The number of parameters accepted by the node.
GetParameterMax
Gets the maximum allowed value of the parameter at the given index.
Parameters:
-
indexThe parameter index.
Returns:
The maximum allowed value of the parameter at the given index.
GetParameterMin
Gets the minimum allowed value of the parameter at the given index.
Parameters:
-
indexThe parameter index.
Returns:
The minimum allowed value of the parameter at the given index.
GetParameterName
Gets the name of the parameter at the given index.
Parameters:
-
indexThe parameter index.
Returns:
The name of the parameter at the given index.
GetParameterType
Gets the type of the parameter at the given index.
Parameters:
-
indexThe parameter index.
Returns:
The type of the parameter at the given index.
Public Static Functions Documentation¶
Construct
Creates a new instance of the node with the given name and returns its pointer.
Parameters:
-
nameThe name of the node.
Returns:
The node with the given name, or nullptr if not found.
Find
Look up a node by name.
Returns:
The node with the given name, or nullptr if not found.
GetRegistry
Gets the list of registered nodes.
Returns:
The registry of nodes.
LockRegistry
Locks the nodes' registry.
Warning:
This function is mainly used for internal purposes. It's called before the Engine initialization, to discard the registration of new nodes after the engine is fully loaded.
Register
Registers a new node.
Parameters:
-
nodeThe node to add in the registry.
UnlockRegistry
Unlocks the nodes' registry.
Warning:
This function is mainly used for internal purposes. It's called after the Engine deinitialization, to allow the registration of new nodes after the engine is fully unloaded.
Unregister
Unregisters a node.
Parameters:
-
nodeThe node to remove from the registry.
Protected Attributes Documentation¶
The documentation for this class was generated from the following file: include/SparkyStudios/Audio/Amplitude/Mixer/Node.h