Skip to content

Commit 98efb64

Browse files
Revert "Adjust tests for liblo-0.32"
This reverts commit 0e91f0c.
1 parent 2904e9f commit 98efb64

File tree

1 file changed

+30
-32
lines changed

1 file changed

+30
-32
lines changed

test/performance.cpp

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -134,26 +134,26 @@ int main()
134134
/*
135135
* create all the messages
136136
*/
137-
rtosc_message(events[0], 1024, "/PFMDetune", "i", 23);
138-
rtosc_message(events[1], 1024, "/oscil/blam", "c", 23);
139-
rtosc_message(events[2], 1024, "/PFilterEnabled", "T");
140-
rtosc_message(events[3], 1024, "/PVolume", "c", 23);
141-
rtosc_message(events[4], 1024, "/Enabled", "T");
142-
rtosc_message(events[5], 1024, "/Unison_size", "c", 1);
143-
rtosc_message(events[6], 1024, "/Unison_frequency_spread", "c", 2);
144-
rtosc_message(events[7], 1024, "/Unison_stereo_spread", "c", 3);
145-
rtosc_message(events[8], 1024, "/Unison_vibratto", "c", 4);
146-
rtosc_message(events[9], 1024, "/Unison_vibratto_speed", "c", 5);
147-
rtosc_message(events[10], 1024, "/Unison_invert_phase", "");
148-
rtosc_message(events[11], 1024, "/FilterLfo/another/few/layers", "");
149-
rtosc_message(events[12], 1024, "/FreqEnvelope/blam", "");
150-
rtosc_message(events[13], 1024, "/PINVALID_RANDOM_STRING", "ics", 23, 23, "23");
151-
rtosc_message(events[14], 1024, "/PFMVelocityScaleFunction", "i", 23);
152-
rtosc_message(events[15], 1024, "/PFMDetune", "i", 230);
153-
rtosc_message(events[16], 1024, "/Pfixedfreq", "F");
154-
rtosc_message(events[17], 1024, "/detunevalue", "");
155-
rtosc_message(events[18], 1024, "/PfixedfreqET", "c", 10);
156-
rtosc_message(events[19], 1024, "/PfixedfreqET", "");
137+
rtosc_message(events[0], 1024, "PFMDetune", "i", 23);
138+
rtosc_message(events[1], 1024, "oscil/blam", "c", 23);
139+
rtosc_message(events[2], 1024, "PFilterEnabled", "T");
140+
rtosc_message(events[3], 1024, "PVolume", "c", 23);
141+
rtosc_message(events[4], 1024, "Enabled", "T");
142+
rtosc_message(events[5], 1024, "Unison_size", "c", 1);
143+
rtosc_message(events[6], 1024, "Unison_frequency_spread", "c", 2);
144+
rtosc_message(events[7], 1024, "Unison_stereo_spread", "c", 3);
145+
rtosc_message(events[8], 1024, "Unison_vibratto", "c", 4);
146+
rtosc_message(events[9], 1024, "Unison_vibratto_speed", "c", 5);
147+
rtosc_message(events[10], 1024, "Unison_invert_phase", "");
148+
rtosc_message(events[11], 1024, "FilterLfo/another/few/layers", "");
149+
rtosc_message(events[12], 1024, "FreqEnvelope/blam", "");
150+
rtosc_message(events[13], 1024, "PINVALID_RANDOM_STRING", "ics", 23, 23, "23");
151+
rtosc_message(events[14], 1024, "PFMVelocityScaleFunction", "i", 23);
152+
rtosc_message(events[15], 1024, "PFMDetune", "i", 230);
153+
rtosc_message(events[16], 1024, "Pfixedfreq", "F");
154+
rtosc_message(events[17], 1024, "detunevalue", "");
155+
rtosc_message(events[18], 1024, "PfixedfreqET", "c", 10);
156+
rtosc_message(events[19], 1024, "PfixedfreqET", "");
157157
RtData d;
158158
d.loc_size = 1024;
159159
d.obj = d.loc = loc_buffer;
@@ -166,10 +166,10 @@ int main()
166166
clock_t t_on = clock(); // timer before calling func
167167
for(int j=0; j<200000; ++j) {
168168
for(int i=0; i<20; ++i){
169-
port_table.dispatch(events[i]+1, d);
169+
port_table.dispatch(events[i], d);
170170
}
171171
}
172-
printf("Matches: %d vs expected 3600000\n", d.matches);
172+
//printf("Matches: %d\n", d.matches);
173173
//assert(d.matches == 3600000);
174174
int is_ok = (d.matches == 3600000);
175175
int t_off = clock(); // timer when func returns
@@ -211,7 +211,6 @@ int main()
211211
liblo_port_info.begin();
212212
for(const Port& port : port_table)
213213
{
214-
pinf->name = "/";
215214
for(const char* p = port.name; *p && *p != ':'; ++p)
216215
pinf->name.push_back(*p);
217216

@@ -236,15 +235,14 @@ int main()
236235

237236
// liblo does not support trees, so messages like 'oscil/blam' won't
238237
// dispatch at ports like 'oscil/'. we need to help them a bit...
239-
for(const liblo_message_prepared& lmp : lo_messages) {
240-
if(strchr(lmp.memory+1, '/'))
241-
{
242-
liblo_port_info_t pinf;
243-
pinf.name = lmp.memory;
244-
pinf.typespecs.push_back("");
245-
pinf.accept_all = true;
246-
liblo_port_info.push_back(pinf);
247-
}
238+
for(const liblo_message_prepared& lmp : lo_messages)
239+
if(strchr(lmp.memory, '/'))
240+
{
241+
liblo_port_info_t pinf;
242+
pinf.name = lmp.memory;
243+
pinf.typespecs.push_back("");
244+
pinf.accept_all = true;
245+
liblo_port_info.push_back(pinf);
248246
}
249247

250248
auto add_methods = [&](const std::vector<liblo_port_info_t>& port_info,

0 commit comments

Comments
 (0)