Jamoma API  0.6.0.a19
TTSpatSnap.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 __SPATSNAP_H__
20 #define __SPATSNAP_H__
21 
22 #include "TTDSP.h"
23 #include "TTSampleMatrix.h"
24 #include "TTSpatEntity.h"
25 #include "TTSpatSnapRenderer.h"
26 #include "TTSpatBase.h"
27 
28 
29 /** This class is eventually intended to provide a generalised interface for spatial renderers.
30  @todo The class might be further generalised so that it can be reused for other spatial renderers.
31  */
32 class TTSpatSnap : public TTSpatBase {
34 
35  /** Unit Tests.
36  @param aReturnedTestInfo Information on the outcome of the tests.
37  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
38  */
39  virtual TTErr test(TTValue& aReturnedTestInfo);
40 
41 
42 private:
43 
44  /** Unit tests of the getters and setters for the attributes sourceCont and sinkCount.
45  @param aTestAssertionCount The number of test assertions that have been performed so far.
46  @param anErrorCount The numebr of assertions that have failed so far.
47  @param aReturnedTestInfo Information on the outcome of the tests.
48  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
49  */
50  TTErr testSourceAndSinkCountSetterAndGetter(int& aTestAssertionCount, int& anErrorCount, TTValue& aReturnedTestInfo);
51 
52 
53  /** Unit tests for messages to set and get source positions"
54  @param aTestAssertionCount The number of test assertions that have been performed so far.
55  @param anErrorCount The numebr of assertions that have failed so far.
56  @param aReturnedTestInfo Information on the outcome of the tests.
57  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
58  */
59  TTErr testSourcePositionSetterAndGetter(int& aTestAssertionCount, int& anErrorCount, TTValue& aReturnedTestInfo);
60 
61 
62  /** Unit tests for messages to set and get source positions"
63  @param aTestAssertionCount The number of test assertions that have been performed so far.
64  @param anErrorCount The numebr of assertions that have failed so far.
65  @param aReturnedTestInfo Information on the outcome of the tests.
66  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
67  */
68  TTErr testSinkPositionSetterAndGetter(int& aTestAssertionCount, int& anErrorCount, TTValue& aReturnedTestInfo);
69 
70 
71  /** Unit test for checking that we have correct matrix coefficient values.
72  @param aTestAssertionCount The number of test assertions that have been performed so far.
73  @param anErrorCount The numebr of assertions that have failed so far.
74  @param aReturnedTestInfo Information on the outcome of the tests.
75  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
76  */
77  TTErr testMatrixCoefficients(int& aTestAssertionCount, int& anErrorCount, TTValue& aReturnedTestInfo);
78 
79 
80  /** Unit test that pass multichannel audio to the object and test that we get correct audo for all sink channels.
81  @param aTestAssertionCount The number of test assertions that have been performed so far.
82  @param anErrorCount The numebr of assertions that have failed so far.
83  @param aReturnedTestInfo Information on the outcome of the tests.
84  @return #TTErr error code if the method fails to execute, else #kTTErrNone.
85  */
86  TTErr testAudioProcessing(int& aTestAssertionCount, int& anErrorCount, TTValue& aReturnedTestInfo);
87 
88 };
89 
90 
91 
92 #endif // __SPATSNAP_H__
A basic proof-of-concept spatial renderer where the audio of a source will snap to the nearest sink...
TTSpatEntity describes the geometry of a point, and TTSpatSource and TTSpatSink specialise this furth...
TTSampleMatrix holds some audio in a chunk of memory.
Jamoma DSP Library.
This class is eventually intended to provide a generalised interface for spatial renderers.
Definition: TTSpatSnap.h:32
#define TTCLASS_SETUP(className)
TODO Doxygen: need more comments here.
Definition: TTFoundation.h:54
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
Definition: TTBase.h:342
This class is eventually intended to provide a generalised interface for spatial renderers.
Definition: TTSpatBase.h:31
A basic proof-of-concept spatial renderer where the audio of a source will snap to the nearest sink...
[doxygenAppendixC_copyExample]
Definition: TTValue.h:34