Switchboard SDK
All Classes Functions Variables Pages
switchboard::GainNode Class Reference

Changes the gain of the audio that flows through this node. More...

#include <GainNode.hpp>

Inheritance diagram for switchboard::GainNode:

Public Member Functions

 GainNode (const std::map< std::string, std::any > &config)
 Creates a GainNode instance.
 
SB_WASM float getGain () const
 Gets the current gain value.
 
SB_WASM void setGain (const float newValue)
 Sets the gain.
 
SB_WASM bool setBusFormat (AudioBusFormat &inputBusFormat, AudioBusFormat &outputBusFormat) override
 
SB_WASM bool process (AudioBus &inBus, AudioBus &outBus) override
 

Detailed Description

Changes the gain of the audio that flows through this node.

GainNode class.

Constructor & Destructor Documentation

◆ GainNode()

switchboard::GainNode::GainNode ( const std::map< std::string, std::any > & config)

Creates a GainNode instance.

Parameters
configConfiguration map for the node.

Member Function Documentation

◆ getGain()

float switchboard::GainNode::getGain ( ) const

Gets the current gain value.

Returns
The gain value.

◆ setGain()

void switchboard::GainNode::setGain ( const float newValue)

Sets the gain.

Parameters
newValueThe gain value to set.