NAP
Public Member Functions | Protected Attributes | List of all members
OutputPin Class Referencefinal

#include <audio/core/audiopin.h>

Public Member Functions

 OutputPin (Node *node)
 
 ~OutputPin ()
 
void disconnectAll ()
 
SampleBufferpull ()
 
NodegetNode ()
 

Protected Attributes

SampleBuffer mBuffer
 The buffer containing the latest output. More...
 

Description

An audio output is used by audio node to connect it to other nodes. The output connects one channel (mono) audio. It outputs a pointer to an owned SampleBuffer. The PullFunction of this class calls a calculate function on the node it belongs to.

Constructor & Destructor Documentation

◆ OutputPin()

OutputPin ( Node node)
Parameters
nodethe owner node if this output

◆ ~OutputPin()

~OutputPin ( )

Member Function Documentation

◆ disconnectAll()

void disconnectAll ( )

Disconnects the output from all connected inputs. For threadsafety connection is enqueued on the audio thread.

◆ getNode()

Node& getNode ( )
Returns
the node that owns this output.

◆ pull()

SampleBuffer* pull ( )

Used by InputPin to poll this output for a new buffer of output samples

Returns
nullptr if no output is available.

Member Data Documentation

◆ mBuffer

SampleBuffer mBuffer
protected

The buffer containing the latest output.