Jamoma API  0.6.0.a19
TTSpatBaseRenderer.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup dspSpatLib
4  *
5  * @brief A basic proof-of-concept spatial renderer where the audio of a source will snap to the nearest sink.
6  *
7  * @details
8  *
9  * @todo: Extend with a solution for interpolating to new matrix coefficients
10  *
11  * @authors Trond Lossius, Nils Peters, Timothy Place
12  *
13  * @copyright Copyright © 2011 by Trond Lossius, Nils Peters, and Timothy Place @n
14  * This code is licensed under the terms of the "New BSD License" @n
15  * http://creativecommons.org/licenses/BSD/
16  */
17 
18 
19 #ifndef __SPATBASERENDERER_H__
20 #define __SPATBASERENDERER_H__
21 
22 #include "TTDSP.h"
23 #include "TTSampleMatrix.h"
24 #include "TTSpatEntity.h"
25 
26 
27 /** TTSpatBaseRenderer defines the basic interface from which all renderers inherit.
28  */
30 
31 public:
32 
33  TTSampleMatrixPtr mMixerMatrixCoefficients; ///< A matrix holding all coefficient for matrix-based mixing of sources to sinks.
34 
35 
36  /** Constructor
37  */
39 
40 
41  /** Destructor
42  */
43  virtual ~TTSpatBaseRenderer();
44 
45  /** This method _must_ be defined by subclasses
46  @details This method also takes care of matrix resizing if the number of sources or sinks change.
47  @param sources A vector of sources
48  @param sinks A vector of sinks
49  */
50  virtual void recalculateMatrixCoefficients(TTSpatSourceVector& sources, TTSpatSinkVector& sinks) = 0;
51 
52 
53  /** A standard matrix-based audio processing method which may be used for matrix-based spatialization algorithms.
54  Subclasses using other techniques may override this method.
55  @param inputs Incomming audio signals to process from sound sources.
56  @param outputs Processed audio signals passed to the sinks.
57  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
58  */
60 
61 };
62 
63 
64 #endif // __SPATBASERENDERER_H__
virtual TTErr processAudio(TTAudioSignalArrayPtr inputs, TTAudioSignalArrayPtr outputs)
A standard matrix-based audio processing method which may be used for matrix-based spatialization alg...
virtual void recalculateMatrixCoefficients(TTSpatSourceVector &sources, TTSpatSinkVector &sinks)=0
This method must be defined by subclasses.
TTSpatEntity describes the geometry of a point, and TTSpatSource and TTSpatSink specialise this furth...
TTSampleMatrix holds some audio in a chunk of memory.
virtual ~TTSpatBaseRenderer()
Destructor.
Jamoma DSP Library.
Container object that holds some audio in a chunk of memory.
TTSampleMatrixPtr mMixerMatrixCoefficients
A matrix holding all coefficient for matrix-based mixing of sources to sinks.
TTSpatBaseRenderer()
Constructor.
A simple container for an array of TTAudioSignal pointers.
std::vector< TTSpatSource > TTSpatSourceVector
Pointer to a vector of TTSpatSource points.
Definition: TTSpatEntity.h:108
std::vector< TTSpatSink > TTSpatSinkVector
Pointer to a vector of TTSpatSink points.
Definition: TTSpatEntity.h:114
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
TTSpatBaseRenderer defines the basic interface from which all renderers inherit.