17 #define TT_NO_DEPRECATION_WARNINGS
25 int testAssertionCount = 0;
31 myDataspace.set(
TT(
"dataspace"),
TT(
"gain"));
46 myDataspace.
set(
TT(
"inputUnit"),
TT(
"linear"));
47 myDataspace.set(
TT(
"outputUnit"),
TT(
"linear"));
52 myDataspace.send(
TT(
"convert"), v, v);
54 TTTestAssertion(
"linear to linear",
63 myDataspace.set(
TT(
"inputUnit"),
TT(
"dB"));
64 myDataspace.set(
TT(
"outputUnit"),
TT(
"linear"));
69 myDataspace.send(
TT(
"convert"), v, v);
71 TTTestAssertion(
"0 dB to linear",
79 myDataspace.set(
TT(
"inputUnit"),
TT(
"midigain"));
80 myDataspace.set(
TT(
"outputUnit"),
TT(
"linear"));
85 myDataspace.send(
TT(
"convert"), v, v);
87 TTTestAssertion(
"100 midi gain to linear",
102 myDataspace.set(
TT(
"inputUnit"),
TT(
"linear"));
103 myDataspace.set(
TT(
"outputUnit"),
TT(
"dB"));
108 myDataspace.send(
TT(
"convert"), v, v);
110 TTTestAssertion(
"1.0 linear to dB",
115 myDataspace.set(
TT(
"inputUnit"),
TT(
"linear"));
116 myDataspace.set(
TT(
"outputUnit"),
TT(
"dB"));
121 myDataspace.send(
TT(
"convert"), v, v);
123 TTTestAssertion(
"0.0 linear to dB, avoid -inf dB by clipping to 24bit resolution (-144.49 dB).",
131 myDataspace.set(
TT(
"inputUnit"),
TT(
"linear"));
132 myDataspace.set(
TT(
"outputUnit"),
TT(
"midigain"));
137 myDataspace.send(
TT(
"convert"), v, v);
139 TTTestAssertion(
"1.0 linear to midi gain",
152 myDataspace.set(
TT(
"inputUnit"),
TT(
"midigain"));
153 myDataspace.set(
TT(
"outputUnit"),
TT(
"dB"));
158 myDataspace.send(
TT(
"convert"), v, v);
160 TTTestAssertion(
"127 midi gain to 10 dB",
167 myDataspace.set(
TT(
"inputUnit"),
TT(
"dB"));
168 myDataspace.set(
TT(
"outputUnit"),
TT(
"midigain"));
173 myDataspace.send(
TT(
"convert"), v, v);
175 TTTestAssertion(
"10 dB to 127 midi gain",
182 myDataspace.set(
TT(
"inputUnit"),
TT(
"midigain"));
183 myDataspace.set(
TT(
"outputUnit"),
TT(
"linear"));
188 myDataspace.send(
TT(
"convert"), v, v);
190 TTTestAssertion(
"0 midi gain to 0 linear",
197 myDataspace.set(
TT(
"inputUnit"),
TT(
"linear"));
198 myDataspace.set(
TT(
"outputUnit"),
TT(
"midigain"));
203 myDataspace.send(
TT(
"convert"), v, v);
205 TTTestAssertion(
"0 linear to 0 midigain",
214 testAssertionCount = 1;
217 return TTTestFinish(testAssertionCount, errorCount, returnedTestInfo);
Create and use Jamoma object instances.
double TTFloat64
64 bit floating point number
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
The GainDataspace converts between different measurement untis describing audio gain.
void set(const TTUInt16 index, const T &anElementValue)
DEPRECATED.
void TTFOUNDATION_EXPORT TTLogMessage(TTImmutableCString message,...)
Platform and host independent method for posting log messages.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
[doxygenAppendixC_copyExample]