18 #ifndef __TTAUDIOGRAPH_OBJECT_H__
19 #define __TTAUDIOGRAPH_OBJECT_H__
81 void resetSampleStamp()
101 mAudioFlags = mAudioFlags & ~flag;
110 if (forOutletNumber < mAudioOutlets.size())
111 return mAudioOutlets[forOutletNumber].mBufferedOutput->getNumChannelsAsInt();
123 sSharedMutex->lock();
125 if (forOutletNumber < mAudioOutlets.size()) {
129 mAudioOutlets[forOutletNumber].mBufferedOutput->setMaxNumChannels(v);
130 mAudioOutlets[forOutletNumber].mBufferedOutput->setNumChannels(v);
132 sSharedMutex->unlock();
142 if (forOutletNumber < mAudioOutlets.size())
143 return mAudioOutlets[forOutletNumber].mBufferedOutput->getVectorSizeAsInt();
155 if (forOutletNumber < mAudioOutlets.size())
156 return mAudioOutlets[forOutletNumber].mBufferedOutput->getSampleRate();
168 mKernel.get(kTTSym_sampleRate, sr);
175 void prepareAudioDescription();
217 sSharedMutex->lock();
225 sSharedMutex->unlock();
246 class TTAudioGraphObject :
public TTObject {
257 TTAudioGraphObject(
const TTValue args) :
299 TTErr connectAudio(TTAudioGraphObject& anObject,
TTUInt16 fromOutletNumber=0,
TTUInt16 toInletNumber=0)
331 #endif // __TTAUDIOGRAPH_OBJECT_H__
The TTGraphObjectBase wraps a TTDSP object such that it is possible to build a dynamic graph of audio...
std::uint16_t TTUInt16
16 bit unsigned integer
TTUInt32 getOutputSampleRate(TTUInt16 forOutletNumber)
Get the sample rate of the audio passed from one of the outlets.
TTErr send(const TTSymbol aName)
Send a message to this object with no arguments.
void messages(TTValue &returnedMessageNames) const
Return a list of names of the available messages.
TTUInt16 getOutputVectorSize(TTUInt16 forOutletNumber)
Get the vector size for an outlet.
TTUInt16 mVectorSize
The most recent vector size info passed from the terminal object during a preprocess.
std::uint64_t TTUInt64
64 bit unsigned integer
void removeAudioFlag(TTAudioGraphFlags flag)
remove an audio flag.
Wrap TTAudioSignalArray instances for convenience.
Describes a node in an audio processing graph.
void setOutputNumChannels(TTUInt16 forOutletNumber, TTChannelCount numChannels)
Set the number of channels for an outlet.
Create and use Jamoma object instances.
TTAudioGraphOutletVector mAudioOutlets
The outlets that processed audio sampled will be passed to.
This object provides a description of a TTAudioGraphObject and its sources.
void lockProcessing()
The thread protection for processing is important: we cannot have the graph nodes being deleted or re...
Registers classes for the primary AudioGraph library.
Defines a single 'outlet' from an individual AudioGraph object.
Wrap audio objects for convenience.
Jamoma Asynchronous Object Graph Layer.
TTAudioGraphDescription mAudioDescription
Used to prevent feedback loops etc. when describing a graph.
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
TTAudioArray mInputSignals
The buffered input for processing audio with our object.
TTErr set(const TTSymbol aName, T aValue)
Set an attribute value for an object.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
TTUInt32 mNumAudioInlets
Attribute: The number of inputs for this object.
TTAudioGraphProcessStatus
[doxygenAppendixC_enumExample]
The TTAudioSignal class represents N vectors of audio samples for M channels.
TTAudioObject & getUnitGenerator()
...
TTUInt32 mNumAudioOutlets
Attribute: The number of outlets for this object.
void unlockProcessing()
The thread protection for processing is important: we cannot have the graph nodes being deleted or re...
TTUInt16 TTChannelCount
Data type used when counting the number of channels in multi-channel audio signals and processes...
TTAudioGraphFlags
[doxygenAppendixC_bitmaskExample]
void addAudioFlag(TTAudioGraphFlags flag)
Set an audio flag.
TTChannelCount getOutputNumChannels(TTUInt16 forOutletNumber)
Get the number of channels for an outlet.
TTUInt64 mSampleStamp
The current time in samples, as determined from the pulling of this object.
TTAudioArray mOutputSignals
The results of processing audio with our object, buffered for objects requesting it.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
The TTAudioGraphObjectBase wraps a TTDSP object such that it is possible to build a dynamic graph of ...
[doxygenAppendixC_bitmaskExample]
void attributes(TTValue &returnedAttributeNames) const
Return a list of names of the available attributes.
std::uint32_t TTUInt32
32 bit unsigned integer
TTAudioGraphInletVector mAudioInlets
The inlets through which we pull audio from sources.
TTObject mKernel
The actual TT object doing the processing.
TTObjectBase * instance() const
Return a direct pointer to the internal instance.
TTUInt32 getSampleRate()
Get the sample rate that this object use when processing audio.
[doxygenAppendixC_copyExample]
TTAudioGraphProcessStatus mStatus
Used to enable correct processing of feedback loops, multiple destinations, etc.
static TTMutexPtr sSharedMutex
A critical region shared by all TTAudioGraphObjectBases to prevent changes to the graph while process...
TTUInt32 mAudioFlags
A bitmask of values defined in TTAudioGraphFlags.