19 #define thisTTClass TTBuffer
20 #define thisTTClassName "buffer"
21 #define thisTTClassTags "dspLibrary, audio, buffer"
33 extern "C" void TTBuffer::registerClass()
35 TTClassRegister(
"buffer", thisTTClassTags, TTBuffer::instantiate);
39 TTBuffer::TTBuffer(
const TTValue& arguments) :
42 mBecomingActiveMatrix(NULL)
50 if (arguments.
size() > 0) {
51 channelCount = arguments[0];
52 if (arguments.
size() > 1)
72 init(channelCount, name);
90 if (!gTTBufferNameMap)
91 gTTBufferNameMap =
new TTHash;
93 setAttributeValue(
"name", name);
120 TTErr TTBuffer::prepareBecomingActiveMatrix()
140 TTLogError(
"TTBuffer failed to prepare new SampleMatrix");
147 TTErr TTBuffer::promoteBecomingActiveMatrix()
187 if (checkOutMatrix(startUsingThisMatrix) ==
kTTErrNone)
193 output.
append(startUsingThisObject);
212 chuckMatrix(doneUsingThisMatrix);
216 doneUsingThisMatrix = NULL;
224 TTObject doneUsingThisObject = input[0];
227 if (doneUsingThisObject.
name() !=
TT(
"samplematrix"))
234 return checkInMatrix(doneUsingThisMatrix);
An inappropriate value was specified for an attribute or variable.
TTSampleMatrixPtr mBecomingActiveMatrix
pointer to TTSampleMatrix that is being prepared internally for a future checkOutMatrix() ...
TTErr TTObjectBaseRelease(TTObjectBasePtr *anObject)
DEPRECATED.
TTErr decrementUserCount()
Decrease the user count by one.
TTAudioObjectBase is the base class for all audio generating and processing objects in Jamoma DSP...
Create and use Jamoma object instances.
64-bit unsigned integer, range is 0 through 18,446,744,073,709,551,615.
size_type size() const noexcept
Return the number of elements.
no longer active, but waiting for remaining users to check in
TTSampleMatrix holds some audio in a chunk of memory.
TTBuffer manages the check-in/out of TTSampleMatrix pointers.
Base class for all first-class Jamoma objects.
TTErr(TTObjectBase::* TTMethod)(const TTSymbol methodName, const TTValue &anInputValue, TTValue &anOutputValue)
A type that can be used to store a pointer to a message for an object.
TTErr setAttributeValue(const TTSymbol name, TTValue &value)
Set an attribute value for an object.
Maintain a collection of TTValue objects indexed by TTSymbol pointers.
static TTSymbol random()
Generate a pseudo-random symbol.
TTErr registerMessage(const TTSymbol name, TTMethod method)
Register a message with this object.
16-bit unsigned integer, range is 0 through 65,535.
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
void append(const T &anElementValueToAppend)
Insert a single TTElement at the end.
TTErr adaptTo(const TTSampleMatrix &anotherMatrix)
Set dimensions, element count, datatype, etc.
Container object that holds some audio in a chunk of memory.
void * TTPtr
A generic pointer.
TTSymbol name() const
Return the name of this class.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
TTErr incrementUserCount()
Increase the user count by one.
TTUInt16 getUserCount()
Report the current user count.
void TTFOUNDATION_EXPORT TTLogError(TTImmutableCString message,...)
Platform and host independent method for posting errors.
TTErr TTObjectBaseInstantiate(const TTSymbol className, TTObjectBasePtr *returnedObjectPtr, const TTValue arguments)
DEPRECATED.
in use and pointer to this TTSampleMatrix will be given to users at check out
#define addMessageWithArguments(name)
A convenience macro to be used by subclasses for registering messages.
TTUInt16 TTChannelCount
Data type used when counting the number of channels in multi-channel audio signals and processes...
void clear()
Clear all values from the vector, leaving with size of 0.
TTBoolean isBufferPoolStage(TTBufferPoolStageEnum testValue)
Test to see if current bufferPoolStage matches a test value.
Something went wrong, but what exactly is not known. Typically used for context-specific problems...
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
#define addAttributeWithSetter(name, type)
A convenience macro to be used by subclasses for registering attributes with a custom setter...
#define addMessage(name)
A convenience macro to be used by subclasses for registering messages.
TTObjectBase * instance() const
Return a direct pointer to the internal instance.
TTBuffer manages the check-in/out of TTSampleMatrix pointers.
TTErr setBufferPoolStage(TTBufferPoolStageEnum newValue)
Set the current bufferPoolStage to a new value.
[doxygenAppendixC_copyExample]
being prepared for active stage by resizing or file loading operation
TTSampleMatrixPtr mActiveMatrix
pointer to TTSampleMatrix that will be returned via checkOutMatrix()
#define addUpdates(updateName)
An 'update' is a message sent to a subclass instance from its parent class.
#define addAttributeWithGetterAndSetter(name, type)
A convenience macro to be used by subclasses for registering attributes with a custom getter and sett...
TTUInt32 sr
Current sample rate being used by this object.