|
Jamoma API
0.6.0.a19
|
Jamoma's lowest-level base class and related infrastructure. More...
#include <algorithm>#include <cstring>#include <cmath>#include <cstdlib>#include <cstdio>#include <iostream>#include <string>#include <vector>#include <complex>#include <sstream>#include <iterator>#include <stdexcept>#include <cstdint>#include <atomic>#include <libkern/OSAtomic.h>
Include dependency graph for TTBase.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Classes | |
| class | TTException |
| A TTBlue exception is thown with this object. More... | |
Macros | |
| #define | TT_ALIGN_16 __attribute__((aligned (16))) |
| Supress warnings about use of deprecated methods. More... | |
Typedefs | |
| typedef bool | TTBoolean |
| Boolean flag, same as Boolean on the Mac. | |
| typedef unsigned char | TTByte |
| Byte value. | |
| typedef TTByte * | TTBytePtr |
| Data is a pointer to some bytes. | |
| typedef signed char | TTInt8 |
| 8 bit signed integer (char) | |
| typedef unsigned char | TTUInt8 |
| 8 bit unsigned integer (char) | |
| typedef std::int16_t | TTInt16 |
| 16 bit signed integer | |
| typedef std::uint16_t | TTUInt16 |
| 16 bit unsigned integer | |
| typedef std::int32_t | TTInt32 |
| 32 bit signed integer | |
| typedef std::uint32_t | TTUInt32 |
| 32 bit unsigned integer | |
| typedef std::int64_t | TTInt64 |
| 64 bit signed integer | |
| typedef std::uint64_t | TTUInt64 |
| 64 bit unsigned integer | |
| typedef float | TTFloat32 |
| 32 bit floating point number | |
| typedef double | TTFloat64 |
| 64 bit floating point number | |
| typedef std::complex< double > | TTComplex |
| Complex number. | |
| typedef TTInt32 | TTRowID |
| Datatype for any number used to indicate a row index within a matrix. More... | |
| typedef TTInt32 | TTColumnID |
| Datatype for any number used to indicate a column index within the matrix. More... | |
| typedef TTInt16 | TTElementID |
| Datatype for any number used to indicate an element index within the matrix. More... | |
| typedef TTFloat64 | TTSampleValue |
| A value representing a single audio sample. More... | |
| typedef std::vector< TTSampleValue > | TTSampleVector |
| A TTSampleVector is simply a pointer to the first of an array of TTSampleValues. More... | |
| typedef long | TTPtrSizedInt |
| An integer that is the same size as a pointer. More... | |
| typedef std::atomic< int32_t > | TTAtomicInt |
| An integer that can be used for atomic operations. More... | |
| typedef void * | TTPtr |
| A generic pointer. More... | |
| typedef void(* | TTFunctionPtr) () |
| A simple/generic function pointer with no args. More... | |
| typedef void(* | TTFunctionWithArgPtr) (TTPtr) |
| A simple/generic function pointer with one arg. More... | |
| typedef void(* | TTFunctionMatch) (const TTValue &valueToCheck, TTPtr baton, TTBoolean &found) |
| Use for finding stuff in a list or a hash or a dictionary. More... | |
| typedef TTErr(* | TTFunctionWithBatonAndValue) (const TTValue &, const TTValue &) |
| A simple/generic function pointer with a baton as TTValueRef and the value to send back as a TTValueRef. More... | |
Enumerations | |
| enum | TTDataType { , kTypeFloat32, kTypeFloat64, kTypeInt8, kTypeUInt8, kTypeInt16, kTypeUInt16, kTypeInt32, kTypeUInt32, kTypeInt64, kTypeUInt64, kTypeBoolean, kTypeSymbol, kTypeObject, kTypePointer, kTypeString, kTypeLocalValue, kTypeMatrix, kTypeDictionary, kTypeError } |
| TTBlue Data Types Enumeration of data types used through out TTBlue, including the TTValue class and declaring the types of TTAttribute objects. More... | |
| enum | TTErr { kTTErrNone = 0, kTTErrGeneric, kTTErrAllocFailed, kTTErrFreeFailed, kTTErrInvalidType, kTTErrInvalidAttribute, kTTErrInvalidValue, kTTErrWrongNumValues, kTTErrMethodNotFound, kTTErrValueNotFound, kTTErrBadChannelConfig, kTTErrReadOnly, kTTErrOutOfBounds, kTTErrInstantiateFailed, kTTErrInvalidFilepath } |
| Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions and methods. More... | |
Functions | |
| TTFloat64 | TTGetTimeInMilliseconds () |
| Return the current system time in milliseconds. More... | |
| TTFloat64 | TTGetTimeInMicroseconds () |
| Return the current system time in microseconds. More... | |
| TTFOUNDATION_EXPORT TTFloat64 | TTRandom64 () |
| Produces a random-valued 64-bit floating-point number in the range [0.0, 1.0]. | |
| void TTFOUNDATION_EXPORT | TTLogMessage (TTImmutableCString message,...) |
| Platform and host independent method for posting log messages. More... | |
| void TTFOUNDATION_EXPORT | TTLogWarning (TTImmutableCString message,...) |
| Platform and host independent method for posting warnings. More... | |
| void TTFOUNDATION_EXPORT | TTLogError (TTImmutableCString message,...) |
| Platform and host independent method for posting errors. More... | |
| void TTFOUNDATION_EXPORT | TTLogDebug (TTImmutableCString message,...) |
| Platform and host independent method for posting messages only when debugging is enabled in the environment. More... | |
| TTPtr TTFOUNDATION_EXPORT | TTMalloc16 (size_t numBytes) |
| Allocate memory from the heap aligned to 16-byte boundaries. More... | |
| void TTFOUNDATION_EXPORT | TTFree16 (TTPtr ptr) |
| Free memory allocated using TTMalloc16(). More... | |
Variables | |
| TTFOUNDATION_EXPORT TTDataInfoPtr | ttDataTypeInfo [kNumTTDataTypes] |
| An array, indexed by values from TTDataType, containing information about those data types. More... | |
| TTFOUNDATION_EXPORT const TTFloat32 | kTTLookupEqualPower [] |
| Equal Power lookup table, 512 elements. | |
| TTFOUNDATION_EXPORT const TTFloat32 | kTTLookupSquareRoot [] |
| Square Root lookup table, 512 elements. | |
| TTFOUNDATION_EXPORT const TTFloat32 | kTTLookupEqualPowerSymetric [] |
| Equal Power lookup table with 0.701 at element 256. | |
| TTFOUNDATION_EXPORT const TTFloat32 | kTTLookupSquareRootSymetric [] |
| Square Root lookup table with 0.701 at element 256. | |
| TTFOUNDATION_EXPORT const TTFloat32 | kTTLookupHalfPaddedwWelch [] |
| 256 point window table (the first half of it) | |
| TTFOUNDATION_EXPORT const TTFloat32 | kTTLookupQuarterSine [] |
| Quarter Sine lookup table. | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTPi |
| [doxygenAppendixC_constExample] More... | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTHalfPi |
| Pre-calculated value of pi/2. | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTQuarterPi |
| [doxygenAppendixC_constExample] More... | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTTwoPi |
| Pre-calculated value of pi * 2. | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTAntiDenormalValue |
| Constant used by the ttantidenormal function. | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTSqrt2 |
| Pre-calculated square-root of 2 (1.4142). | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTHalfSqrt2 |
| Pre-calculated value of sqrt(2)/2 (0.701). | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTTwoSqrt2 |
| Pre-calculated value of 2 * sqrt(2) (2.8284). | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTEpsilon |
| A very very small value, used for float equality comaprisments. | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTRadiansToDegrees |
| Factor constant for converting radians to degrees. | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTDegreesToRadians |
| Factor constant for converting degrees to radians. | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTGainMidiPower |
| Power constant used when calculating MID gain. | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTGainMidiPowerInv |
| Invverse power constant used when calculating MID gain. | |
| TTFOUNDATION_EXPORT const TTFloat64 | kTTInv255 |
| Constant for color representation when converting from char8 to float representation. | |
Jamoma's lowest-level base class and related infrastructure.
The Jamoma base class.
Definition in file TTBase.h.
| #define TT_ALIGN_16 __attribute__((aligned (16))) |
Supress warnings about use of deprecated methods.
This macro should be defined at the top of a file before any includes in order to be made active. In general, the use of this macro should be viewed with suspicion. If it used a comment should accompany its use to explain the special situation that warrants the usage.
| typedef std::atomic<int32_t> TTAtomicInt |
| typedef void(* TTFunctionPtr) () |
| typedef void(* TTFunctionWithArgPtr) (TTPtr) |
| typedef long TTPtrSizedInt |
| typedef TTFloat64 TTSampleValue |
| typedef std::vector<TTSampleValue> TTSampleVector |
| void TTFOUNDATION_EXPORT TTFree16 | ( | TTPtr | ptr | ) |
Free memory allocated using TTMalloc16().
Definition at line 647 of file TTBase.cpp.
Referenced by TTAudioSignal::alloc(), TTAudioSignal::allocWithNewChannelCount(), TTElement::operator delete(), TTAudioUnit::processAudio(), and TTAudioSignal::setVector().
|
inline |
Return the current system time in microseconds.
Definition at line 445 of file TTBase.h.
Referenced by TTDataObjectBase::calculate(), and TTAudioObjectBase::process().
|
inline |
| void TTFOUNDATION_EXPORT TTLogDebug | ( | TTImmutableCString | message, |
| ... | |||
| ) |
Platform and host independent method for posting messages only when debugging is enabled in the environment.
| message | The message to post. |
Definition at line 591 of file TTBase.cpp.
References TTEnvironment::mDebugBasic, and ttEnvironment.
Referenced by TTObjectBase::logDebug(), and TTEnvironment::registerClass().
| void TTFOUNDATION_EXPORT TTLogError | ( | TTImmutableCString | message, |
| ... | |||
| ) |
Platform and host independent method for posting errors.
| message | The message to post. |
Definition at line 572 of file TTBase.cpp.
Referenced by TTClass::createInstance(), TTAudioEngine::destroy(), TTApplicationManager::findProtocol(), TTAudioEngine::initStream(), TTObjectBase::logError(), MIDIInputPoll(), TTWebSocket::SendMessage(), TTAudioEngine::start(), TTAudioEngine::stop(), and TTObject::TTObject().
| void TTFOUNDATION_EXPORT TTLogMessage | ( | TTImmutableCString | message, |
| ... | |||
| ) |
Platform and host independent method for posting log messages.
| message | The message to post. |
Definition at line 534 of file TTBase.cpp.
Referenced by TTSymbolTable::dump(), TTObjectBase::logMessage(), TTEnvironment::referenceInstance(), TTEnvironment::releaseInstance(), TTSoundfilePlayer::setFilePath(), TTSoundfile::setFilePath(), TTUiInfo::setHighlight(), TTDSPInit(), and TTModularInit().
| void TTFOUNDATION_EXPORT TTLogWarning | ( | TTImmutableCString | message, |
| ... | |||
| ) |
Platform and host independent method for posting warnings.
| message | The message to post. |
Definition at line 553 of file TTBase.cpp.
Referenced by TTObjectBase::logWarning(), and TTUiInfo::setHighlight().
| TTPtr TTFOUNDATION_EXPORT TTMalloc16 | ( | size_t | numBytes | ) |
Allocate memory from the heap aligned to 16-byte boundaries.
This memory MUST be freed using TTFree16().
Definition at line 641 of file TTBase.cpp.
Referenced by TTAudioSignal::alloc(), TTAudioSignal::allocWithNewChannelCount(), TTElement::operator new(), TTAudioUnit::processAudio(), and TTAudioSignal::setMaxNumChannels().
| TTFOUNDATION_EXPORT TTDataInfoPtr ttDataTypeInfo[kNumTTDataTypes] |
An array, indexed by values from TTDataType, containing information about those data types.
Definition at line 424 of file TTBase.cpp.
Referenced by TTObjectBase::getAttributeType(), TTTrajectory::ramp(), TTAudioObjectBaseArray::set(), and TTMatrixBase::setTypeWithoutResize().