NAP
Public Member Functions | List of all members
InputPin Class Referencefinal

#include <audio/core/audiopin.h>

Public Member Functions

 InputPin (Node *node)
 
virtual ~InputPin () override
 
SampleBufferpull ()
 
void connect (OutputPin &input) override
 
void disconnect (OutputPin &input) override
 
void disconnectAll () override
 
bool isConnected () const override
 
- Public Member Functions inherited from InputPinBase
 InputPinBase (Node *node)
 
virtual ~InputPinBase ()
 
void enqueueConnect (OutputPin &pin)
 
void enqueueDisconnect (OutputPin &pin)
 
NodegetNode ()
 

Description

An input pin is used by audio node to connect it to other nodes. The pin connects one channel (mono) audio.

Inheritance diagram for InputPin:
[legend]
Collaboration diagram for InputPin:
[legend]

Constructor & Destructor Documentation

◆ InputPin()

InputPin ( Node node)

◆ ~InputPin()

virtual ~InputPin ( )
overridevirtual

Destructor. If the input is connected on destruction the connection will be broken first.

Member Function Documentation

◆ connect()

void connect ( OutputPin input)
overridevirtual

Connects another node's OutputPin to this input. If either this ipnut or the connected output is already connected it will be disconnected first.

Parameters
inputThe output that this InputPin will be connected to.

Implements InputPinBase.

◆ disconnect()

void disconnect ( OutputPin input)
overridevirtual

Disconnects this input from the specified output, if this connections exists.

Implements InputPinBase.

◆ disconnectAll()

void disconnectAll ( )
overridevirtual

If connected, disconnects this pin.

Implements InputPinBase.

◆ isConnected()

bool isConnected ( ) const
overridevirtual
Returns
wether the input is connected

Implements InputPinBase.

◆ pull()

SampleBuffer* pull ( )

This method can be used by the node to pull one sample buffer output from the connected audio output.

Returns
Pointer to the sample buffer containing the input coming in through the pin. If the InputPin is not connected or somewhere down the graph silence is being output nullptr can be returned.