Jamoma API  0.6.0.a19
TTAudioGraphSource Class Reference

TTAudioGraphSource represents one link from a TTAudioGraphInlet of a TTAudioGraphObjectBase to a TTAudioGraphOutlet of an upstream TTAudioGraphObjectBase. More...

#include <TTAudioGraphSource.h>

+ Collaboration diagram for TTAudioGraphSource:

Public Member Functions

 TTAudioGraphSource ()
 Constructor.
 
 TTAudioGraphSource (const TTAudioGraphSource &original)
 Copy Constructor.
 
 ~TTAudioGraphSource ()
 Destructor.
 
void create ()
 Create a link to a source. More...
 
TTBoolean match (TTAudioGraphObjectBasePtr anObject, TTUInt16 anOutletNumber)
 Check to see if this source (link) is connected to the requested outlet of the requested upstream object. More...
 
void setOwner (TTAudioGraphInlet *theOwningInlet)
 Set the owning inlet of this source. More...
 
TTAudioGraphSourceoperator= (const TTAudioGraphSource &original)
 This operator is called, for example, on the Mac when dropping a source and the vector has to be re-arranged.
 
void prepareDescription ()
 Prepare to describe this source (link or connection).
 
void getDescription (TTAudioGraphDescription &desc)
 Describe this source. More...
 
void connect (TTAudioGraphObjectBasePtr anObject, TTUInt16 fromOutletNumber)
 Create a source (a connection or a link) to an outlet of an upstream object. More...
 
void preprocess (const TTAudioGraphPreprocessData &initData)
 Prepare for audio processing.
 
TTErr process (TTAudioSignalPtr &returnedSignal, TTUInt64 sampleStamp)
 Perform audio processing. More...
 

Protected Attributes

TTAudioGraphObjectBasePtr mSourceObject
 The object from which we pull samples.
 
TTUInt16 mOutletNumber
 The outlet of the upstream object that we pull samples from. This is zero-based.
 
TTObject mCallbackHandler
 TODO.
 
TTAudioGraphInletmOwner
 The owning inlet.
 

Friends

bool operator== (const TTAudioGraphSource &source1, const TTAudioGraphSource &source2)
 Compare two sources for equality, that is: It they are representing a connection between the same inlet/outlet pair of the same objects. More...
 

Detailed Description

TTAudioGraphSource represents one link from a TTAudioGraphInlet of a TTAudioGraphObjectBase to a TTAudioGraphOutlet of an upstream TTAudioGraphObjectBase.

Definition at line 36 of file TTAudioGraphSource.h.

Member Function Documentation

void TTAudioGraphSource::connect ( TTAudioGraphObjectBasePtr  anObject,
TTUInt16  fromOutletNumber 
)

Create a source (a connection or a link) to an outlet of an upstream object.

Parameters
anObjectThe upstream object that we want to connect to.
fromOutletNumberThe outlet of the upstream object that we want to connect to.

Definition at line 110 of file TTAudioGraphSource.cpp.

References mCallbackHandler, mOutletNumber, mSourceObject, and TTObjectBase::registerObserverForNotifications().

Referenced by operator=(), and TTAudioGraphSource().

+ Here is the call graph for this function:

void TTAudioGraphSource::create ( )

Create a link to a source.

This establish a link between a TTAudioGraphInlet and a TTAudioGraphOutlet of an upstream TTAudioGraphObjectBase.

Definition at line 80 of file TTAudioGraphSource.cpp.

References mCallbackHandler, and TTObject::set().

Referenced by operator=(), and TTAudioGraphSource().

+ Here is the call graph for this function:

void TTAudioGraphSource::getDescription ( TTAudioGraphDescription desc)
inline

Describe this source.

Parameters
descPointer to TTAudioGraphDescription used for returning the description.

Definition at line 119 of file TTAudioGraphSource.h.

References TTAudioGraphObjectBase::getAudioDescription(), and mOutletNumber.

+ Here is the call graph for this function:

TTBoolean TTAudioGraphSource::match ( TTAudioGraphObjectBasePtr  anObject,
TTUInt16  anOutletNumber 
)
inline

Check to see if this source (link) is connected to the requested outlet of the requested upstream object.

Parameters
anObjectThe upstream object that we want to check if match this source.
anOutletNumberThe object outlet that we want to check if match this source.
Returns
TRUE if we have a match, else FALSE.

Definition at line 72 of file TTAudioGraphSource.h.

TTErr TTAudioGraphSource::process ( TTAudioSignalPtr returnedSignal,
TTUInt64  sampleStamp 
)
inline

Perform audio processing.

This pass a request for a buffer of processed audio to the upstream associated source.

Returns
TTErr error code if the method fails to execute, else kTTErrNone.

Definition at line 147 of file TTAudioGraphSource.h.

References TTAudioGraphObjectBase::process().

+ Here is the call graph for this function:

void TTAudioGraphSource::setOwner ( TTAudioGraphInlet theOwningInlet)

Set the owning inlet of this source.

Parameters
theOwningInletThe inlet that will be owning this source (link).

Definition at line 88 of file TTAudioGraphSource.cpp.

References mOwner.

Friends And Related Function Documentation

bool operator== ( const TTAudioGraphSource source1,
const TTAudioGraphSource source2 
)
friend

Compare two sources for equality, that is: It they are representing a connection between the same inlet/outlet pair of the same objects.

Parameters
source1The first source to be compared.
source2The second source to be compared.
Returns
TRUE if the two sources (links or connections) are the same, else FALSE.

Definition at line 97 of file TTAudioGraphSource.h.


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