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

Has a sink and source node. Can be used to utilize output as input, without introducing a cycle to the graph. More...

#include <Pipe.hpp>

Public Member Functions

 Pipe ()
 
bool setBusFormat (AudioBusFormat &busFormat)
 Sets bus format.
 
bool consume (AudioBus &bus)
 Consumes audio data from the given bus.
 
bool produce (AudioBus &bus)
 Produces audio data in the given bus.
 
SingleBusAudioSinkNodegetSinkNode ()
 Gets the sink(input) node of the pipe.
 
SingleBusAudioSourceNodegetSourceNode ()
 Gets the source(output) node of the pipe.
 

Detailed Description

Has a sink and source node. Can be used to utilize output as input, without introducing a cycle to the graph.

Pipe class.

Constructor & Destructor Documentation

◆ Pipe()

switchboard::Pipe::Pipe ( )

Creates a Pipe instance

Member Function Documentation

◆ consume()

bool switchboard::Pipe::consume ( AudioBus & bus)

Consumes audio data from the given bus.

Parameters
busThe bus that contain the audio data.
Returns
True if audio was consumed successfully, false otherwise.

◆ getSinkNode()

SingleBusAudioSinkNode & switchboard::Pipe::getSinkNode ( )

Gets the sink(input) node of the pipe.

Returns
The audio input node.

◆ getSourceNode()

SingleBusAudioSourceNode & switchboard::Pipe::getSourceNode ( )

Gets the source(output) node of the pipe.

Returns
The audio output node.

◆ produce()

bool switchboard::Pipe::produce ( AudioBus & bus)

Produces audio data in the given bus.

Parameters
busThe bus that should be filled with audio data.
Returns
True if audio was produced successfully, false otherwise.

◆ setBusFormat()

bool switchboard::Pipe::setBusFormat ( AudioBusFormat & busFormat)

Sets bus format.

Parameters
busFormatThe bus format to set.
Returns
True if the bus format was set successfully, false otherwise.