24#include <cxxtest/TestSuite.h>
53 synth->buffersize = 256;
56 for(
int i = 0;
i <
synth->buffersize; ++
i)
59 for(
int i = 0;
i <
synth->buffersize; ++
i)
65 for(
int i = 0;
i <
synth->buffersize; ++
i)
70 XMLwrapper *wrap =
new XMLwrapper();
72 +
string(
"/guitar-adnote.xmz"));
73 TS_ASSERT(wrap->enterbranch(
"MASTER"));
74 TS_ASSERT(wrap->enterbranch(
"PART", 1));
75 TS_ASSERT(wrap->enterbranch(
"INSTRUMENT"));
76 TS_ASSERT(wrap->enterbranch(
"INSTRUMENT_KIT"));
77 TS_ASSERT(wrap->enterbranch(
"INSTRUMENT_KIT_ITEM", 0));
78 TS_ASSERT(wrap->enterbranch(
"SUB_SYNTH_PARAMETERS"));
85 float freq = 440.0f * powf(2.0f, (
testnote - 69.0f) / 12.0f);
121 ofstream
file(
"subnoteout", ios::out);
125 for(
int i = 0;
i <
synth->buffersize; ++
i)
129 sampleCount +=
synth->buffersize;
131 TS_ASSERT_DELTA(
outL[255], 0.0000f, 0.0001f);
137 sampleCount +=
synth->buffersize;
138 TS_ASSERT_DELTA(
outL[255], 0.0016f, 0.0001f);
141 sampleCount +=
synth->buffersize;
142 TS_ASSERT_DELTA(
outL[255], -0.0000f, 0.0001f);
145 sampleCount +=
synth->buffersize;
146 TS_ASSERT_DELTA(
outL[255], -0.0013f, 0.0001f);
149 sampleCount +=
synth->buffersize;
150 TS_ASSERT_DELTA(
outL[255], -0.0002f, 0.0001f);
152 while(!
note->finished()) {
155 for(
int i = 0;
i <
synth->buffersize; ++
i)
159 sampleCount +=
synth->buffersize;
165 TS_ASSERT_EQUALS(sampleCount, 2304);
168#define OUTPUT_PROFILE
171 const int samps = 15000;
174 for(
int i = 0;
i < samps; ++
i)
178 printf(
"SubNoteTest: %f seconds for %d Samples to be generated.\n",
179 (
static_cast<float>(t_off - t_on)) / CLOCKS_PER_SEC, samps);
SYNTH_T * synth
Definition LocalZynAddSubFx.cpp:47
SYNTH_T * synth
Definition SubNoteTest.h:34
float * denormalkillbuf
Definition Util.cpp:46
Definition Controller.h:9
Definition SUBnoteParameters.h:33
void getfromXML(XMLwrapper *xml)
Definition SUBnoteParameters.cpp:240
Definition SubNoteTest.h:39
unsigned char testnote
Definition SubNoteTest.h:45
Controller * controller
Definition SubNoteTest.h:44
Master * master
Definition SubNoteTest.h:43
void willNoteBeRunButIsHereForLinkingReasonsHowsThisForCamelCaseEh()
Definition SubNoteTest.h:98
float * outL
Definition SubNoteTest.h:48
float * outR
Definition SubNoteTest.h:48
SUBnote * note
Definition SubNoteTest.h:42
void setUp()
Definition SubNoteTest.h:50
void tearDown()
Definition SubNoteTest.h:103
void testSpeed()
Definition SubNoteTest.h:170
void testDefaults()
Definition SubNoteTest.h:112
register unsigned i
Definition inflate.c:1575
JHUFF_TBL long freq[]
Definition jchuff.h:50
Definition juce_Uuid.h:141
struct zdirent * file
Definition win32.c:1500
#define SOURCE_DIR
Definition zynaddsubfx-src.cpp:21