@@ -116,25 +116,6 @@ void dmx_eurolite_setchannel(t_dmx_eurolite *self, long ch, long val)
116
116
*/
117
117
void dmx_eurolite_set (t_dmx_eurolite *self, t_symbol *sym, long argc,
118
118
t_atom *argv)
119
- {
120
- if (argc < 2 )
121
- return ;
122
- const int first = atom_getlong (argv);
123
- const int data_count = argc - 1 ;
124
- std::vector<unsigned char > data;
125
- data.reserve (data_count);
126
- // iterate from the second element of argv to the end
127
- for (int i = 1 ; i < argc; i++)
128
- {
129
- data.push_back (
130
- static_cast <unsigned char >(clamp ((int )atom_getlong (argv + i), 0 , 255 )));
131
- }
132
- self->dmx ->set_channel_array_from (first, data_count, data.data ());
133
- }
134
-
135
- // a version using std::array instead of std::vector (for testing)
136
- void dmx_eurolite_set1 (t_dmx_eurolite *self, t_symbol *sym, long argc,
137
- t_atom *argv)
138
119
{
139
120
if (argc < 2 || argc > 513 )
140
121
return ;
@@ -149,41 +130,6 @@ void dmx_eurolite_set1(t_dmx_eurolite *self, t_symbol *sym, long argc,
149
130
self->dmx ->set_channel_array_from (first, data_count, data.data ());
150
131
}
151
132
152
- // a version using C-style array // not much improvement from std::array
153
- void dmx_eurolite_set2 (t_dmx_eurolite *self, t_symbol *sym, long argc,
154
- t_atom *argv)
155
- {
156
- if (argc < 2 || argc > 512 )
157
- return ;
158
- const int first = atom_getlong (argv);
159
- const int data_count = argc - 1 ;
160
- unsigned char data[512 ];
161
- int c = data_count;
162
- int i = 0 ;
163
- while (c--,i++)
164
- {
165
- data[i]=
166
- static_cast <unsigned char >(clamp ((int )atom_getlong (argv + i), 0 , 255 ));
167
- }
168
- self->dmx ->set_channel_array_from (first, data_count, data);
169
- }
170
-
171
- // a version using std::array and memcpy
172
- void dmx_eurolite_set3 (t_dmx_eurolite *self, t_symbol *sym, long argc,
173
- t_atom *argv)
174
- {
175
- if (argc < 2 || argc > 513 )
176
- return ;
177
- const int first = atom_getlong (argv);
178
- const int data_count = argc - 1 ;
179
- std::array<unsigned char , 512 > data;
180
- for (int i = 0 ; i < data_count; i++)
181
- {
182
- data[i]=
183
- static_cast <unsigned char >(clamp ((int )atom_getlong (argv + i), 0 , 255 ));
184
- }
185
- self->dmx ->set_channel_memcpy_from (first, data_count, data.data ());
186
- }
187
133
188
134
void dmx_eurolite_assist (t_dmx_eurolite *self, void *unused,
189
135
t_assist_function io, long index, char *string_dest)
@@ -239,9 +185,6 @@ void ext_main(void *r)
239
185
class_addmethod (this_class, (method)dmx_eurolite_setchannel, " setchannel" ,
240
186
A_DEFLONG, A_DEFLONG, 0 );
241
187
class_addmethod (this_class, (method)dmx_eurolite_set, " set" , A_GIMME, 0 );
242
- class_addmethod (this_class, (method)dmx_eurolite_set1, " set1" , A_GIMME, 0 ); // TESTING
243
- class_addmethod (this_class, (method)dmx_eurolite_set2, " set2" , A_GIMME, 0 ); // TESTING
244
- class_addmethod (this_class, (method)dmx_eurolite_set3, " set3" , A_GIMME, 0 ); // TESTING
245
188
class_addmethod (this_class, (method)dmx_eurolite_open, " open" , 0 );
246
189
class_addmethod (this_class, (method)dmx_eurolite_close, " close" , 0 );
247
190
class_addmethod (this_class, (method)dmx_eurolite_clear, " clear" , 0 );
0 commit comments