Jamoma API  0.6.0.a19
TTAudioGraphInlet Class Reference

This object represents a single 'inlet' to a TTAudioGraphObject. More...

#include <TTAudioGraphInlet.h>

+ Collaboration diagram for TTAudioGraphInlet:

Public Member Functions

 ~TTAudioGraphInlet ()
 Object destructor.
 
TTAudioGraphInletoperator= (const TTAudioGraphInlet &source)
 The copy assignment constructor doesn't appear to be involved, at least with resizes, on the Mac...
 
void reset ()
 Reset the graph by dropping all connections to all sources in preparation of a rebuilding of all of the graph.
 
TTErr connect (TTAudioGraphObjectBasePtr anObject, TTUInt16 fromOutletNumber)
 Establish a connection from an output of an upstream node to one of the inlets of this node so that processing might occur. More...
 
TTErr drop (TTAudioGraphObjectBasePtr anObject, TTUInt16 fromOutletNumber)
 Drop a connection from an upstream node. More...
 
void drop (TTAudioGraphSource &aSource)
 Drop a connection (if any) to an upstream source. More...
 
void preprocess (const TTAudioGraphPreprocessData &initData)
 Just before audio processing, a preprocess() method is propagated up the audio graph chain from the terminal object. More...
 
TTErr process (TTUInt64 sampleStamp)
 With the objects in the graph prepared by the preprocess() call, the audio can be pulled from nodes connected upstream using the process() call on each source. More...
 
TTAudioSignalPtr getBuffer ()
 Get the most recently processed audio for this inlet as summerized from all connected upstream nodes. More...
 
void prepareDescriptions ()
 Prepare for a request that wants to descibe all of the graph. More...
 
void getDescriptions (TTAudioGraphDescriptionVector &descs)
 The node is requested to declare itself as part of an action to describe all of the audio graph. More...
 

Protected Attributes

TTAudioGraphSourceVector mSourceObjects
 A vector of object pointers from which we pull our source samples using the ::getAudioOutput() method.
 
TTAudioSignalPtr mBufferedInput
 Summed samples from all sources.
 
TTAudioSignalPtr mDirectInput
 Pointer to the (non-buffered) input samples if there was no requirement to sum them.
 

Detailed Description

This object represents a single 'inlet' to a TTAudioGraphObject.

TTAudioGraphObject maintains a vector of these inlets.

The relationship of an inlet to other parts of the audio graph hierarchy is as follows:

  • A graph may have many objects.
  • An object may have many inlets.
  • An inlet may have many signals connected.
  • A signal may have many channels.

Definition at line 44 of file TTAudioGraphInlet.h.

Member Function Documentation

TTErr TTAudioGraphInlet::connect ( TTAudioGraphObjectBasePtr  anObject,
TTUInt16  fromOutletNumber 
)
inline

Establish a connection from an output of an upstream node to one of the inlets of this node so that processing might occur.

Parameters
anObjectReference to an upstream node.
fromOutletNumberThe outlet of the upstrem node that the connection is being made from.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 137 of file TTAudioGraphInlet.h.

References kTTErrNone.

TTErr TTAudioGraphInlet::drop ( TTAudioGraphObjectBasePtr  anObject,
TTUInt16  fromOutletNumber 
)
inline

Drop a connection from an upstream node.

Parameters
anObjectReference to an upstream node.
fromOutletNumberThe outlet of the upstrem node that the connection for which the connection will be dropped.
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 160 of file TTAudioGraphInlet.h.

References kTTErrNone.

void TTAudioGraphInlet::drop ( TTAudioGraphSource aSource)
inline

Drop a connection (if any) to an upstream source.

This method is called if a node is being destroyed to ensure that no stray connections from it are left behind.

Parameters
aSourceThe potential upstream node (source) for which all connections are to be dropped.

Definition at line 176 of file TTAudioGraphInlet.h.

TTAudioSignalPtr TTAudioGraphInlet::getBuffer ( )
inline

Get the most recently processed audio for this inlet as summerized from all connected upstream nodes.

Returns
Pointer to the audio buffer used for summerizing signals from connected upstream nodes.

Definition at line 240 of file TTAudioGraphInlet.h.

References mBufferedInput, and mDirectInput.

void TTAudioGraphInlet::getDescriptions ( TTAudioGraphDescriptionVector &  descs)
inline

The node is requested to declare itself as part of an action to describe all of the audio graph.

As part of this action the request is also propagated to its upstream neighboors, and retrieved information on the graph is passed back down again to the sink(s) of the graph.

Parameters
descsPointer to the graph description vector used by the downstream neighboor(s) to retrieve information on this node and its upstesream connections.

Definition at line 264 of file TTAudioGraphInlet.h.

void TTAudioGraphInlet::prepareDescriptions ( )
inline

Prepare for a request that wants to descibe all of the graph.

The request for preparing to describe the graph is propagated to all nodes that are connected upstream.

Definition at line 252 of file TTAudioGraphInlet.h.

void TTAudioGraphInlet::preprocess ( const TTAudioGraphPreprocessData initData)
inline

Just before audio processing, a preprocess() method is propagated up the audio graph chain from the terminal object.

This can be used to zero buffers and also sets flags that indicate each object’s processing state. It is of no consequence if an object receives multiple preprocess calls, such as would happen if there are multiple terminal nodes.

Parameters
initData

Definition at line 190 of file TTAudioGraphInlet.h.

References TTAudioSignal::clear().

+ Here is the call graph for this function:

TTErr TTAudioGraphInlet::process ( TTUInt64  sampleStamp)
inline

With the objects in the graph prepared by the preprocess() call, the audio can be pulled from nodes connected upstream using the process() call on each source.

When asked for a vector of audio by the unit generator, the inlets each request audio from each of their sources (other objects’ outlets). If an inlet has multiple sources, those sources are summed. When all of the inlets have performed this operation, then the unit generator proceeds to process the audio buffered in the inlets and fills the buffers in the outlets. Sources manage a one-to-one connection between an inlet and an upstream object's outlet; inlets may have zero or more sources.

Parameters
sampleStamp(Trond will document this)
Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 208 of file TTAudioGraphInlet.h.

References kTTErrNone.


The documentation for this class was generated from the following file: