24 int testAssertionCount = 0;
27 int badSampleCount = 0;
57 TTFloat64 expectedImpulseResponseBipolar[64] = {
58 0.0000000000000000e+00,
59 0.0000000000000000e+00,
60 0.0000000000000000e+00,
61 0.0000000000000000e+00,
62 0.0000000000000000e+00,
63 0.0000000000000000e+00,
64 0.0000000000000000e+00,
65 0.0000000000000000e+00,
66 0.0000000000000000e+00,
67 0.0000000000000000e+00,
73 0.0000000000000000e+00,
74 0.0000000000000000e+00,
75 0.0000000000000000e+00,
76 0.0000000000000000e+00,
77 0.0000000000000000e+00,
78 0.0000000000000000e+00,
79 0.0000000000000000e+00,
80 0.0000000000000000e+00,
81 0.0000000000000000e+00,
82 0.0000000000000000e+00,
83 0.0000000000000000e+00,
84 0.0000000000000000e+00,
85 0.0000000000000000e+00,
86 0.0000000000000000e+00,
87 0.0000000000000000e+00,
88 0.0000000000000000e+00,
89 0.0000000000000000e+00,
90 0.0000000000000000e+00,
91 0.0000000000000000e+00,
92 0.0000000000000000e+00,
93 0.0000000000000000e+00,
94 0.0000000000000000e+00,
95 0.0000000000000000e+00,
96 0.0000000000000000e+00,
97 0.0000000000000000e+00,
98 0.0000000000000000e+00,
99 0.0000000000000000e+00,
100 0.0000000000000000e+00,
101 0.0000000000000000e+00,
102 0.0000000000000000e+00,
103 0.0000000000000000e+00,
104 0.0000000000000000e+00,
105 0.0000000000000000e+00,
106 0.0000000000000000e+00,
107 0.0000000000000000e+00,
108 0.0000000000000000e+00,
109 0.0000000000000000e+00,
110 0.0000000000000000e+00,
111 0.0000000000000000e+00,
112 0.0000000000000000e+00,
113 0.0000000000000000e+00,
114 0.0000000000000000e+00,
115 0.0000000000000000e+00,
116 0.0000000000000000e+00,
117 0.0000000000000000e+00,
118 0.0000000000000000e+00,
119 0.0000000000000000e+00,
120 0.0000000000000000e+00,
121 0.0000000000000000e+00
124 for (
int i=0; i<64; i++) {
126 badSampleCount += !result;
128 TTTestLog(
"BAD SAMPLE @ i=%i ( value=%.10f expected=%.10f )", i, output->
mSampleVectors[0][i], expectedImpulseResponseBipolar[i]);
131 TTTestAssertion(
"Produces expected results with bipolar mode",
136 TTTestLog(
"badSampleCount is %i", badSampleCount);
157 TTFloat64 expectedImpulseResponseAbsolute[64] = {
158 0.0000000000000000e+00,
159 0.0000000000000000e+00,
160 0.0000000000000000e+00,
161 0.0000000000000000e+00,
162 0.0000000000000000e+00,
163 0.0000000000000000e+00,
164 0.0000000000000000e+00,
165 0.0000000000000000e+00,
166 0.0000000000000000e+00,
167 0.0000000000000000e+00,
173 0.0000000000000000e+00,
174 0.0000000000000000e+00,
175 0.0000000000000000e+00,
176 0.0000000000000000e+00,
177 0.0000000000000000e+00,
178 0.0000000000000000e+00,
179 0.0000000000000000e+00,
180 0.0000000000000000e+00,
181 0.0000000000000000e+00,
182 0.0000000000000000e+00,
183 0.0000000000000000e+00,
184 0.0000000000000000e+00,
185 0.0000000000000000e+00,
186 0.0000000000000000e+00,
187 0.0000000000000000e+00,
188 0.0000000000000000e+00,
189 0.0000000000000000e+00,
190 0.0000000000000000e+00,
191 0.0000000000000000e+00,
192 0.0000000000000000e+00,
193 0.0000000000000000e+00,
194 0.0000000000000000e+00,
195 0.0000000000000000e+00,
196 0.0000000000000000e+00,
197 0.0000000000000000e+00,
198 0.0000000000000000e+00,
199 0.0000000000000000e+00,
200 0.0000000000000000e+00,
201 0.0000000000000000e+00,
202 0.0000000000000000e+00,
203 0.0000000000000000e+00,
204 0.0000000000000000e+00,
205 0.0000000000000000e+00,
206 0.0000000000000000e+00,
207 0.0000000000000000e+00,
208 0.0000000000000000e+00,
209 0.0000000000000000e+00,
210 0.0000000000000000e+00,
211 0.0000000000000000e+00,
212 0.0000000000000000e+00,
213 0.0000000000000000e+00,
214 0.0000000000000000e+00,
215 0.0000000000000000e+00,
216 0.0000000000000000e+00,
217 0.0000000000000000e+00,
218 0.0000000000000000e+00,
219 0.0000000000000000e+00,
220 0.0000000000000000e+00,
221 0.0000000000000000e+00
224 for (
int i=0; i<64; i++) {
226 badSampleCount += !result;
228 TTTestLog(
"BAD SAMPLE @ i=%i ( value=%.10f expected=%.10f )", i, output->
mSampleVectors[0][i], expectedImpulseResponseAbsolute[i]);
231 TTTestAssertion(
"Produces expected results with absolute mode",
236 TTTestLog(
"badSampleCount is %i", badSampleCount);
256 TTFloat64 expectedImpulseResponseRms[64] = {
257 0.0000000000000000e+00,
258 0.0000000000000000e+00,
259 0.0000000000000000e+00,
260 0.0000000000000000e+00,
261 0.0000000000000000e+00,
262 0.0000000000000000e+00,
263 0.0000000000000000e+00,
264 0.0000000000000000e+00,
265 0.0000000000000000e+00,
266 0.0000000000000000e+00,
272 0.0000000000000000e+00,
273 0.0000000000000000e+00,
274 0.0000000000000000e+00,
275 0.0000000000000000e+00,
276 0.0000000000000000e+00,
277 0.0000000000000000e+00,
278 0.0000000000000000e+00,
279 0.0000000000000000e+00,
280 0.0000000000000000e+00,
281 0.0000000000000000e+00,
282 0.0000000000000000e+00,
283 0.0000000000000000e+00,
284 0.0000000000000000e+00,
285 0.0000000000000000e+00,
286 0.0000000000000000e+00,
287 0.0000000000000000e+00,
288 0.0000000000000000e+00,
289 0.0000000000000000e+00,
290 0.0000000000000000e+00,
291 0.0000000000000000e+00,
292 0.0000000000000000e+00,
293 0.0000000000000000e+00,
294 0.0000000000000000e+00,
295 0.0000000000000000e+00,
296 0.0000000000000000e+00,
297 0.0000000000000000e+00,
298 0.0000000000000000e+00,
299 0.0000000000000000e+00,
300 0.0000000000000000e+00,
301 0.0000000000000000e+00,
302 0.0000000000000000e+00,
303 0.0000000000000000e+00,
304 0.0000000000000000e+00,
305 0.0000000000000000e+00,
306 0.0000000000000000e+00,
307 0.0000000000000000e+00,
308 0.0000000000000000e+00,
309 0.0000000000000000e+00,
310 0.0000000000000000e+00,
311 0.0000000000000000e+00,
312 0.0000000000000000e+00,
313 0.0000000000000000e+00,
314 0.0000000000000000e+00,
315 0.0000000000000000e+00,
316 0.0000000000000000e+00,
317 0.0000000000000000e+00,
318 0.0000000000000000e+00,
319 0.0000000000000000e+00,
320 0.0000000000000000e+00
323 for (
int i=0; i<64; i++) {
325 badSampleCount += !result;
327 TTTestLog(
"BAD SAMPLE @ i=%i ( value=%.10f expected=%.10f )", i, output->
mSampleVectors[0][i], expectedImpulseResponseRms[i]);
330 TTTestAssertion(
"Produces expected results with rms mode",
335 TTTestLog(
"badSampleCount is %i", badSampleCount);
345 return TTTestFinish(testAssertionCount, errorCount, returnedTestInfo);
bool TTBoolean
Boolean flag, same as Boolean on the Mac.
TTErr TTObjectBaseRelease(TTObjectBasePtr *anObject)
DEPRECATED.
TTAverage - measuring of averaged and RMS signal energy
TTErr setAttributeValue(const TTSymbol name, TTValue &value)
Set an attribute value for an object.
double TTFloat64
64 bit floating point number
virtual TTErr test(TTValue &returnedTestInfo)
Unit test.
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
TTErr clear()
Zero out all of the sample values in the audio signal.
TTErr TTObjectBaseInstantiate(const TTSymbol className, TTObjectBasePtr *returnedObjectPtr, const TTValue arguments)
DEPRECATED.
The TTAudioSignal class represents N vectors of audio samples for M channels.
TTSampleValue ** mSampleVectors
An array of pointers to the first sample in each vector. Declared Public for fast access...
TTErr process(TTAudioSignal &in, TTAudioSignal &out)
Process the input signal, resulting in an output signal.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
TTErr allocWithVectorSize(const TTUInt16 newVectorSize)
Allocate memory for all channels at the specified vectorsize, if the vectorsize is different from the...
[doxygenAppendixC_copyExample]