Switchboard SDK
Loading...
Searching...
No Matches
switchboard::AudioNodeFactory Class Referenceabstract

Creates audio node instances. More...

#include <AudioNodeFactory.hpp>

Inheritance diagram for switchboard::AudioNodeFactory:
switchboard::SwitchboardAudioNodeFactory

Public Member Functions

virtual std::string getNodeTypePrefix ()=0
 Returns the prefix of the audio node type.
 
virtual AudioNodecreateNode (const std::string &type, std::map< std::string, std::any > config)=0
 Creates an AudioNode instance based on type information.
 

Detailed Description

Creates audio node instances.

AudioNodeFactory class.

Member Function Documentation

◆ createNode()

virtual AudioNode * switchboard::AudioNodeFactory::createNode ( const std::string & type,
std::map< std::string, std::any > config )
pure virtual

Creates an AudioNode instance based on type information.

The returned audio node instances need to be freed by the user of the AudioNodeFactory.

Parameters
typeThe type of the audio node.
configConfiguration values for the audio node.
Returns
A pointer to the created AudioNode instance, or nullptr if the audio node could not be created.

◆ getNodeTypePrefix()

virtual std::string switchboard::AudioNodeFactory::getNodeTypePrefix ( )
pure virtual

Returns the prefix of the audio node type.

The prefix is used to identify the audio node type and it follows the format: <extension name>.<audio node type>.

Returns
The prefix of the audio node type.