Switchboard SDK
Loading...
Searching...
No Matches
switchboard::AudioGraphFactory Class Reference

Creates AudioGraph instances. More...

#include <AudioGraphFactory.hpp>

Public Member Functions

 WASM_EXPORT (AudioGraphFactory)
 

Static Public Member Functions

static void addNodeFactory (const std::shared_ptr< AudioNodeFactory > nodeFactory)
 Registers a node factory that can create audio nodes for the audio graph.
 
static AudioGraphparseJSON (const std::string &config)
 Parses a JSON audio graph config and returns the creates AudioGraph.
 
static WASM AudioGraphparseJSON (const char *config)
 Parses a JSON audio graph config and returns the creates AudioGraph.
 

Detailed Description

Creates AudioGraph instances.

AudioGraphFactory class.

Member Function Documentation

◆ addNodeFactory()

void switchboard::AudioGraphFactory::addNodeFactory ( const std::shared_ptr< AudioNodeFactory > nodeFactory)
static

Registers a node factory that can create audio nodes for the audio graph.

Parameters
nodeFactoryThe added AudioNodeFactory.

◆ parseJSON() [1/2]

AudioGraph * switchboard::AudioGraphFactory::parseJSON ( const char * config)
static

Parses a JSON audio graph config and returns the creates AudioGraph.

The returned audio graph instances need to be freed by the user of the AudioGraphFactory.

Parameters
configThe JSON audio graph config.
Returns
The created AudioGraph instance, or nullptr if the audio graph could not be created.

◆ parseJSON() [2/2]

AudioGraph * switchboard::AudioGraphFactory::parseJSON ( const std::string & config)
static

Parses a JSON audio graph config and returns the creates AudioGraph.

The returned audio graph instances need to be freed by the user of the AudioGraphFactory.

Parameters
configThe JSON audio graph config.
Returns
The created AudioGraph instance, or nullptr if the audio graph could not be created.