Jamoma API  0.6.0.a19
TTThru.cpp
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspEffectsLib
4  *
5  * @brief #TTThru pass an input signal to the output unchanged.
6  *
7  * @authors Tim Place, Trond Lossius
8  *
9  * @copyright Copyright © 2011, Tim Place @n
10  * This code is licensed under the terms of the "New BSD License" @n
11  * http://creativecommons.org/licenses/BSD/
12  */
13 
14 
15 #include "TTThru.h"
16 
17 #define thisTTClass TTThru
18 #define thisTTClassName "thru"
19 #define thisTTClassTags "dspEffectsLib, audio, processor"
20 
21 
22 TT_AUDIO_CONSTRUCTOR
23 {
24  setProcessMethod(processAudio);
25 }
26 
27 
28 TTThru::~TTThru()
29 {
30  ;
31 }
32 
33 
35 {
36  TTAudioSignal& in = inputs->getSignal(0);
37  TTAudioSignal& out = outputs->getSignal(0);
38 
39  // We can't reliably simply reference in the case of jcom.unpack≈ because of crashes
40  // not sure what is going wrong with that yet...
41 
42  //return TTAudioSignal::reference(in, out);
43  return TTAudioSignal::copy(in, out);
44 }
#define setProcessMethod(methodName)
A convenience macro to be used by subclasses for setting the process method.
The TTAudioSignal class represents N vectors of audio samples for M channels.
Definition: TTAudioSignal.h:57
TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
A standard audio processing method as used by TTBlue objects.
Definition: TTThru.cpp:34
A simple container for an array of TTAudioSignal pointers.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
static TTErr copy(const TTAudioSignal &source, TTAudioSignal &dest, TTChannelCount channelOffset=0)
Copy the audio from one signal into another.
TTThru pass an input signal to the output unchanged.