Jamoma API  0.6.0.a19
TTAudioGraph.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup audioGraphLibrary
4  *
5  * @brief Registers classes for the primary AudioGraph library
6  *
7  * @details Creates a wrapper for TTAudioObjectBases that can be used to build an audio processing graph.
8  *
9  * @authors Timothy Place, Trond Lossius
10  *
11  * @copyright Copyright © 2008, Timothy Place @n
12  * This code is licensed under the terms of the "New BSD License" @n
13  * http://creativecommons.org/licenses/BSD/
14  */
15 
16 
17 #ifndef __TTAUDIOGRAPH_H__
18 #define __TTAUDIOGRAPH_H__
19 
20 #include "TTDSP.h"
21 #include "TTGraph.h"
22 
23 // Platform-specific definitions
24 #ifdef TT_PLATFORM_WIN
25  #include "windows.h"
26  #if defined( TTAUDIOGRAPH_EXPORTS )
27  #define TTAUDIOGRAPH_EXPORT __declspec(dllexport)
28  #else
29  #define TTAUDIOGRAPH_EXPORT __declspec(dllimport)
30  #endif
31 
32  #include <algorithm>
33  using namespace std;
34 #else // TT_PLATFORM_MAC
35  #ifdef TTAUDIOGRAPH_EXPORTS
36  #define TTAUDIOGRAPH_EXPORT __attribute__((visibility("default")))
37  #else
38  #define TTAUDIOGRAPH_EXPORT
39  #endif
40 #endif
41 
42 /******************************************************************************************/
43 
44 //! [doxygenAppendixC_enumExample]
45 /** \ingroup enums
46  Enumeration recording the audio processing state of each node of the graph.
47 */
49  kTTAudioGraphProcessUnknown = 0, ///< The current processing status of the node is unknown.
50  kTTAudioGraphProcessNotStarted, ///< Audio processing has not yet started for this node.
51  kTTAudioGraphProcessingCurrently, ///< This node is currently processing audio.
52  kTTAudioGraphProcessComplete ///< This node has completed processing audio for now.
53 };
54 //! [doxygenAppendixC_enumExample]
55 
56 /** \ingroup enums
57  Enumeration recording the state of each node when the graph is asked to describe itself.
58  */
60  kTTAudioGraphDescriptionUnknown = 0, ///< The current status of the node is unknown with respect to describing itself as a member of a graph.
61  kTTAudioGraphDescriptionNotStarted, ///< The process of describing this node in the graph has not yet begun.
62  kTTAudioGraphDescriptionHasStarted, ///< The process of describing this node in the graph has begun.
63 };
64 
65 //! [doxygenAppendixC_bitmaskExample]
66 /** \ingroup bitmasks
67  Enumeration flags signaling specific properties of this node.
68  Values are used as a bitmask.
69  */
71  kTTAudioGraphFlagsNone = 0x00,
72  kTTAudioGraphProcessor = 0x01, ///< This node is an audio effect processor. It expects audio input that will be processed.
73  kTTAudioGraphGenerator = 0x02, ///< This object is an audio generator, and do not expect audio input.
74  kTTAudioGraphNonAdapting = 0x04, ///< This object does not adapt its number of output channels to the number of input channels
75 };
76 //! [doxygenAppendixC_bitmaskExample]
77 
78 
79 /** Data passed to all nodes in the graph when the graph is performing it's pre-process
80  */
82 public:
83  TTUInt16 vectorSize; ///< The global/recommended/initial vectorSize (which can be overriden during process)
84 };
85 
86 
89 typedef std::vector<TTAudioGraphObjectBasePtr> TTAudioGraphObjectBaseVector;
90 typedef TTAudioGraphObjectBaseVector::iterator TTAudioGraphObjectBaseIter;
91 
92 class TTAudioGraphInlet;
93 //typedef TTAudioGraphInlet* TTAudioGraphInletPtr;
94 typedef std::vector<TTAudioGraphInlet> TTAudioGraphInletVector;
95 typedef TTAudioGraphInletVector::iterator TTAudioGraphInletIter;
96 
97 class TTAudioGraphOutlet;
98 //typedef TTAudioGraphOutlet* TTAudioGraphOutletPtr;
99 typedef std::vector<TTAudioGraphOutlet> TTAudioGraphOutletVector;
100 typedef TTAudioGraphOutletVector::iterator TTAudioGraphOutletIter;
101 
102 #include "TTAudioGraphDescription.h"
103 
104 /******************************************************************************************/
105 
106 extern "C" TTAUDIOGRAPH_EXPORT void TTAudioGraphInit(void);
107 
108 
109 #endif // __TTAUDIOGRAPH_H__
std::uint16_t TTUInt16
16 bit unsigned integer
Definition: TTBase.h:176
This node is currently processing audio.
Definition: TTAudioGraph.h:51
Audio processing has not yet started for this node.
Definition: TTAudioGraph.h:50
The current status of the node is unknown with respect to describing itself as a member of a graph...
Definition: TTAudioGraph.h:60
This object represents a single 'outlet' from a TTAudioGraphObject.
Jamoma Asynchronous Object Graph Layer.
Describes a node in an audio processing graph.
STL namespace.
This object is an audio generator, and do not expect audio input.
Definition: TTAudioGraph.h:73
Jamoma DSP Library.
The process of describing this node in the graph has not yet begun.
Definition: TTAudioGraph.h:61
TTAudioGraphDescriptionStatus
[doxygenAppendixC_enumExample]
Definition: TTAudioGraph.h:59
This node is an audio effect processor. It expects audio input that will be processed.
Definition: TTAudioGraph.h:72
The current processing status of the node is unknown.
Definition: TTAudioGraph.h:49
This object does not adapt its number of output channels to the number of input channels.
Definition: TTAudioGraph.h:74
TTUInt16 vectorSize
The global/recommended/initial vectorSize (which can be overriden during process) ...
Definition: TTAudioGraph.h:83
TTAudioGraphProcessStatus
[doxygenAppendixC_enumExample]
Definition: TTAudioGraph.h:48
This object represents a single 'inlet' to a TTAudioGraphObject.
This node has completed processing audio for now.
Definition: TTAudioGraph.h:52
TTAudioGraphFlags
[doxygenAppendixC_bitmaskExample]
Definition: TTAudioGraph.h:70
The TTAudioGraphObjectBase wraps a TTDSP object such that it is possible to build a dynamic graph of ...
[doxygenAppendixC_bitmaskExample]
Definition: TTAudioGraph.h:81
The process of describing this node in the graph has begun.
Definition: TTAudioGraph.h:62