summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_audio.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2014-04-02 15:30:13 +0100
committerTom Hacohen <tom@stosb.com>2014-04-10 04:20:21 +0100
commit3a0d62ffcfad75600a1226afbd703ffdd80c8ca7 (patch)
treee9292e1d8e1338b887a88796f96e3b218bc87d29 /src/tests/ecore/ecore_test_ecore_audio.c
parent96fe5bd941c5100f6435c77e2cfec18866c4bdb2 (diff)
Ecore audio tests: Updated to Eo2.
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore_audio.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c190
1 files changed, 95 insertions, 95 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 04782ce..e4ce60a 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -45,14 +45,14 @@ static Eina_Bool _looped_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Desc
45static Eina_Bool 45static Eina_Bool
46_seek_vol(void *data) 46_seek_vol(void *data)
47{ 47{
48 double len; 48 double len = 0;
49 Eo *in = data; 49 Eo *in = data;
50 Eo *out; 50 Eo *out = NULL;
51 51
52 eo_do(in, ecore_audio_obj_in_output_get(&out)); 52 eo_do(in, out = ecore_audio_obj_in_output_get());
53 53
54 eo_do(out, ecore_audio_obj_volume_set(0.4)); 54 eo_do(out, ecore_audio_obj_volume_set(0.4));
55 eo_do(in, ecore_audio_obj_in_seek(-0.3, SEEK_END, &len)); 55 eo_do(in, len = ecore_audio_obj_in_seek(-0.3, SEEK_END));
56 fail_if(len < 0); 56 fail_if(len < 0);
57 57
58 return EINA_FALSE; 58 return EINA_FALSE;
@@ -61,14 +61,14 @@ _seek_vol(void *data)
61START_TEST(ecore_test_ecore_audio_obj_pulse) 61START_TEST(ecore_test_ecore_audio_obj_pulse)
62{ 62{
63 Eo *in, *out; 63 Eo *in, *out;
64 Eina_Bool ret; 64 Eina_Bool ret = EINA_FALSE;
65 Eina_Bool pulse_context_failed = EINA_FALSE; 65 Eina_Bool pulse_context_failed = EINA_FALSE;
66 66
67 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 67 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
68 fail_if(!in); 68 fail_if(!in);
69 69
70 eo_do(in, ecore_audio_obj_name_set("modem.wav")); 70 eo_do(in, ecore_audio_obj_name_set("modem.wav"));
71 eo_do(in, ecore_audio_obj_source_set(TESTS_SRC_DIR"/modem.wav", &ret)); 71 eo_do(in, ret = ecore_audio_obj_source_set(TESTS_SRC_DIR"/modem.wav"));
72 fail_if(!ret); 72 fail_if(!ret);
73 73
74 out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL); 74 out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
@@ -79,7 +79,7 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
79 eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL)); 79 eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));
80 eo_do(out, eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _failed_cb, &pulse_context_failed)); 80 eo_do(out, eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _failed_cb, &pulse_context_failed));
81 81
82 eo_do(out, ecore_audio_obj_out_input_attach(in, &ret)); 82 eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
83 fail_if(!ret); 83 fail_if(!ret);
84 84
85 ecore_main_loop_begin(); 85 ecore_main_loop_begin();
@@ -112,7 +112,7 @@ START_TEST(ecore_test_ecore_audio_cleanup)
112{ 112{
113 Eo *in, *out; 113 Eo *in, *out;
114 int freq = 1000; 114 int freq = 1000;
115 Eina_Bool ret; 115 Eina_Bool ret = EINA_FALSE;
116 116
117 in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL); 117 in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
118 fail_if(!in); 118 fail_if(!in);
@@ -121,12 +121,12 @@ START_TEST(ecore_test_ecore_audio_cleanup)
121 121
122 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL); 122 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
123 fail_if(!out); 123 fail_if(!out);
124 eo_do(out, ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_OGG, &ret)); 124 eo_do(out, ret = ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_OGG));
125 fail_if(!ret); 125 fail_if(!ret);
126 eo_do(out, ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.ogg", &ret)); 126 eo_do(out, ret = ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.ogg"));
127 fail_if(!ret); 127 fail_if(!ret);
128 128
129 eo_do(out, ecore_audio_obj_out_input_attach(in, &ret)); 129 eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
130 fail_if(!ret); 130 fail_if(!ret);
131 131
132 ecore_idler_add(_idle_del, in); 132 ecore_idler_add(_idle_del, in);
@@ -150,69 +150,69 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
150 150
151 eo_do(in, ecore_audio_obj_name_set("tone")); 151 eo_do(in, ecore_audio_obj_name_set("tone"));
152 152
153 eo_do(in, ecore_audio_obj_in_channels_get(&channel)); 153 eo_do(in, channel = ecore_audio_obj_in_channels_get());
154 fail_if(channel != 1); 154 fail_if(channel != 1);
155 eo_do(in, ecore_audio_obj_in_samplerate_get(&rate)); 155 eo_do(in, rate = ecore_audio_obj_in_samplerate_get());
156 fail_if(rate != 44100); 156 fail_if(rate != 44100);
157 eo_do(in, ecore_audio_obj_in_length_get(&len)); 157 eo_do(in, len = ecore_audio_obj_in_length_get());
158 fail_if(len != 1); 158 fail_if(len != 1);
159 159
160 eo_do(in, ecore_audio_obj_in_length_set(2.5)); 160 eo_do(in, ecore_audio_obj_in_length_set(2.5));
161 eo_do(in, ecore_audio_obj_in_length_get(&len)); 161 eo_do(in, len = ecore_audio_obj_in_length_get());
162 fail_if(len != 2.5); 162 fail_if(len != 2.5);
163 163
164 eo_do(in, ecore_audio_obj_in_looped_set(EINA_TRUE)); 164 eo_do(in, ecore_audio_obj_in_looped_set(EINA_TRUE));
165 165
166 eo_do(in, ecore_audio_obj_in_remaining_get(&len)); 166 eo_do(in, len = ecore_audio_obj_in_remaining_get());
167 fail_if(len != 2.5); 167 fail_if(len != 2.5);
168 168
169 eo_do(in, eo_key_data_get(ECORE_AUDIO_ATTR_TONE_FREQ, (void **)&freq)); 169 eo_do(in, freq = (intptr_t) eo_key_data_get(ECORE_AUDIO_ATTR_TONE_FREQ));
170 fail_if(freq != 1000); 170 fail_if(freq != 1000);
171 171
172 freq = 2000; 172 freq = 2000;
173 eo_do(in, eo_key_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &freq, NULL)); 173 eo_do(in, eo_key_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &freq, NULL));
174 174
175 eo_do(in, eo_key_data_get(ECORE_AUDIO_ATTR_TONE_FREQ, (void **)&freq)); 175 eo_do(in, freq = (intptr_t) eo_key_data_get(ECORE_AUDIO_ATTR_TONE_FREQ));
176 fail_if(freq != 2000); 176 fail_if(freq != 2000);
177 177
178 eo_do(in, eo_key_data_set("foo", "bar", NULL)); 178 eo_do(in, eo_key_data_set("foo", "bar", NULL));
179 eo_do(in, eo_key_data_get("foo", (void **)&tmp)); 179 eo_do(in, tmp = eo_key_data_get("foo"));
180 ck_assert_str_eq(tmp, "bar"); 180 ck_assert_str_eq(tmp, "bar");
181 181
182 eo_do(in, ecore_audio_obj_in_seek(5.0, SEEK_SET, &len)); 182 eo_do(in, len = ecore_audio_obj_in_seek(5.0, SEEK_SET));
183 fail_if(len != -1); 183 fail_if(len != -1);
184 184
185 eo_do(in, ecore_audio_obj_in_seek(1.0, 42, &len)); 185 eo_do(in, len = ecore_audio_obj_in_seek(1.0, 42));
186 fail_if(len != -1); 186 fail_if(len != -1);
187 187
188 eo_do(in, ecore_audio_obj_in_seek(1.0, SEEK_SET, &len)); 188 eo_do(in, len = ecore_audio_obj_in_seek(1.0, SEEK_SET));
189 fail_if(len != 1.0); 189 fail_if(len != 1.0);
190 190
191 eo_do(in, ecore_audio_obj_in_remaining_get(&len)); 191 eo_do(in, len = ecore_audio_obj_in_remaining_get());
192 fail_if(len != 1.5); 192 fail_if(len != 1.5);
193 193
194 eo_do(in, ecore_audio_obj_in_seek(1.0, SEEK_CUR, &len)); 194 eo_do(in, len = ecore_audio_obj_in_seek(1.0, SEEK_CUR));
195 fail_if(len != 2.0); 195 fail_if(len != 2.0);
196 196
197 eo_do(in, ecore_audio_obj_in_remaining_get(&len)); 197 eo_do(in, len = ecore_audio_obj_in_remaining_get());
198 fail_if(len != 0.5); 198 fail_if(len != 0.5);
199 199
200 eo_do(in, ecore_audio_obj_in_seek(-1.0, SEEK_END, &len)); 200 eo_do(in, len = ecore_audio_obj_in_seek(-1.0, SEEK_END));
201 fail_if(len != 1.5); 201 fail_if(len != 1.5);
202 202
203 eo_do(in, ecore_audio_obj_in_remaining_get(&len)); 203 eo_do(in, len = ecore_audio_obj_in_remaining_get());
204 fail_if(len != 1.0); 204 fail_if(len != 1.0);
205 205
206 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL); 206 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
207 fail_if(!out); 207 fail_if(!out);
208 208
209 eo_do(out, ecore_audio_obj_name_set("tmp.wav")); 209 eo_do(out, ecore_audio_obj_name_set("tmp.wav"));
210 eo_do(out, ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_WAV, &ret)); 210 eo_do(out, ret = ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_WAV));
211 fail_if(!ret); 211 fail_if(!ret);
212 eo_do(out, ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.wav", &ret)); 212 eo_do(out, ret = ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.wav"));
213 fail_if(!ret); 213 fail_if(!ret);
214 214
215 eo_do(out, ecore_audio_obj_out_input_attach(in, &ret)); 215 eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
216 fail_if(!ret); 216 fail_if(!ret);
217 217
218 eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_LOOPED, _looped_cb, NULL)); 218 eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_LOOPED, _looped_cb, NULL));
@@ -240,70 +240,70 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
240 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 240 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
241 fail_if(!in); 241 fail_if(!in);
242 242
243 eo_do(in, ecore_audio_obj_format_get(&fmt)); 243 eo_do(in, fmt = ecore_audio_obj_format_get());
244 fail_if(fmt != ECORE_AUDIO_FORMAT_AUTO); 244 fail_if(fmt != ECORE_AUDIO_FORMAT_AUTO);
245 245
246 eo_do(in, ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_FLAC, &ret)); 246 eo_do(in, ret = ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_FLAC));
247 fail_if(!ret); 247 fail_if(!ret);
248 248
249 eo_do(in, ecore_audio_obj_format_get(&fmt)); 249 eo_do(in, fmt = ecore_audio_obj_format_get());
250 fail_if(fmt != ECORE_AUDIO_FORMAT_FLAC); 250 fail_if(fmt != ECORE_AUDIO_FORMAT_FLAC);
251 251
252 eo_do(in, ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_AUTO, &ret)); 252 eo_do(in, ret = ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_AUTO));
253 fail_if(!ret); 253 fail_if(!ret);
254 254
255 eo_do(in, ecore_audio_obj_name_set("sms.ogg")); 255 eo_do(in, ecore_audio_obj_name_set("sms.ogg"));
256 eo_do(in, ecore_audio_obj_source_set(TESTS_SRC_DIR"/sms.ogg", &ret)); 256 eo_do(in, ret = ecore_audio_obj_source_set(TESTS_SRC_DIR"/sms.ogg"));
257 fail_if(!ret); 257 fail_if(!ret);
258 258
259 eo_do(in, ecore_audio_obj_source_get(&src)); 259 eo_do(in, src = ecore_audio_obj_source_get());
260 ck_assert_str_eq(src, TESTS_SRC_DIR"/sms.ogg"); 260 ck_assert_str_eq(src, TESTS_SRC_DIR"/sms.ogg");
261 261
262 eo_do(in, ecore_audio_obj_format_get(&fmt)); 262 eo_do(in, fmt = ecore_audio_obj_format_get());
263 fail_if(fmt != ECORE_AUDIO_FORMAT_OGG); 263 fail_if(fmt != ECORE_AUDIO_FORMAT_OGG);
264 264
265 eo_do(in, ecore_audio_obj_in_channels_get(&channel)); 265 eo_do(in, channel = ecore_audio_obj_in_channels_get());
266 fail_if(channel != 2); 266 fail_if(channel != 2);
267 eo_do(in, ecore_audio_obj_in_samplerate_get(&rate)); 267 eo_do(in, rate = ecore_audio_obj_in_samplerate_get());
268 fail_if(rate != 44100); 268 fail_if(rate != 44100);
269 eo_do(in, ecore_audio_obj_in_length_get(&len)); 269 eo_do(in, len = ecore_audio_obj_in_length_get());
270 fail_if(len == 0); 270 fail_if(len == 0);
271 eo_do(in, ecore_audio_obj_in_remaining_get(&rem)); 271 eo_do(in, rem = ecore_audio_obj_in_remaining_get());
272 fail_if(len != rem); 272 fail_if(len != rem);
273 273
274 eo_do(in, ecore_audio_obj_format_get(&fmt)); 274 eo_do(in, fmt = ecore_audio_obj_format_get());
275 fail_if(fmt != ECORE_AUDIO_FORMAT_OGG); 275 fail_if(fmt != ECORE_AUDIO_FORMAT_OGG);
276 276
277 eo_do(in, ecore_audio_obj_in_seek(0.5, SEEK_SET, &len)); 277 eo_do(in, len = ecore_audio_obj_in_seek(0.5, SEEK_SET));
278 fail_if(len != 0.5); 278 fail_if(len != 0.5);
279 279
280 eo_do(in, ecore_audio_obj_in_seek(0.5, SEEK_CUR, &len)); 280 eo_do(in, len = ecore_audio_obj_in_seek(0.5, SEEK_CUR));
281 fail_if(len != 1.0); 281 fail_if(len != 1.0);
282 282
283 eo_do(in, ecore_audio_obj_in_seek(-1.0, SEEK_END, &len)); 283 eo_do(in, len = ecore_audio_obj_in_seek(-1.0, SEEK_END));
284 fail_if(fabs(rem - 1 - len) > 0.1); 284 fail_if(fabs(rem - 1 - len) > 0.1);
285 285
286 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL); 286 out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
287 fail_if(!out); 287 fail_if(!out);
288 288
289 eo_do(out, ecore_audio_obj_name_set("tmp.wav")); 289 eo_do(out, ecore_audio_obj_name_set("tmp.wav"));
290 eo_do(out, ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_WAV, &ret)); 290 eo_do(out, ret = ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_WAV));
291 fail_if(!ret); 291 fail_if(!ret);
292 292
293 eo_do(out, ecore_audio_obj_format_get(&fmt)); 293 eo_do(out, fmt = ecore_audio_obj_format_get());
294 fail_if(fmt != ECORE_AUDIO_FORMAT_WAV); 294 fail_if(fmt != ECORE_AUDIO_FORMAT_WAV);
295 295
296 296
297// eo_do(out, ecore_audio_obj_source_set("/tmp/file/does/not/exist/hopefully.wav", &ret)); 297// eo_do(out, ecore_audio_obj_source_set("/tmp/file/does/not/exist/hopefully.wav", &ret));
298// fail_if(ret); 298// fail_if(ret);
299 299
300 eo_do(out, ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.wav", &ret)); 300 eo_do(out, ret = ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.wav"));
301 fail_if(!ret); 301 fail_if(!ret);
302 302
303 eo_do(out, ecore_audio_obj_source_get(&src)); 303 eo_do(out, src = ecore_audio_obj_source_get());
304 ck_assert_str_eq(src, TESTS_BUILD_DIR"/tmp.wav"); 304 ck_assert_str_eq(src, TESTS_BUILD_DIR"/tmp.wav");
305 305
306 eo_do(out, ecore_audio_obj_out_input_attach(in, &ret)); 306 eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
307 fail_if(!ret); 307 fail_if(!ret);
308 308
309 eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL)); 309 eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));
@@ -332,47 +332,47 @@ START_TEST(ecore_test_ecore_audio_obj_in_out)
332 fail_if(!in2); 332 fail_if(!in2);
333 fail_if(!out); 333 fail_if(!out);
334 334
335 fail_if(!eo_do(in, ecore_audio_obj_in_output_get(&out2))); 335 eo_do(in, out2 = ecore_audio_obj_in_output_get());
336 336
337 fail_if(out2); 337 fail_if(out2);
338 338
339 fail_if(!eo_do(out, ecore_audio_obj_out_inputs_get(&in3))); 339 eo_do(out, in3 = ecore_audio_obj_out_inputs_get());
340 340
341 fail_if(eina_list_count(in3) != 0); 341 fail_if(eina_list_count(in3) != 0);
342 342
343 fail_if(!eo_do(out, ecore_audio_obj_out_input_attach(in, &attached))); 343 eo_do(out, attached = ecore_audio_obj_out_input_attach(in));
344 fail_if(!attached); 344 fail_if(!attached);
345 345
346 fail_if(!eo_do(out, ecore_audio_obj_out_input_attach(in, &attached))); 346 eo_do(out, attached = ecore_audio_obj_out_input_attach(in));
347 fail_if(attached); 347 fail_if(attached);
348 348
349 fail_if(!eo_do(in, ecore_audio_obj_in_output_get(&out2))); 349 eo_do(in, out2 = ecore_audio_obj_in_output_get());
350 350
351 fail_if(out2 != out); 351 fail_if(out2 != out);
352 352
353 fail_if(!eo_do(out, ecore_audio_obj_out_inputs_get(&in3))); 353 eo_do(out, in3 = ecore_audio_obj_out_inputs_get());
354 354
355 fail_if(eina_list_count(in3) != 1); 355 fail_if(eina_list_count(in3) != 1);
356 fail_if(eina_list_data_get(in3) != in); 356 fail_if(eina_list_data_get(in3) != in);
357 357
358 fail_if(!eo_do(out, ecore_audio_obj_out_input_attach(in2, &attached))); 358 eo_do(out, attached = ecore_audio_obj_out_input_attach(in2));
359 fail_if(!attached); 359 fail_if(!attached);
360 360
361 fail_if(!eo_do(out, ecore_audio_obj_out_inputs_get(&in3))); 361 eo_do(out, in3 = ecore_audio_obj_out_inputs_get());
362 362
363 fail_if(eina_list_count(in3) != 2); 363 fail_if(eina_list_count(in3) != 2);
364 fail_if(eina_list_data_get(in3) != in); 364 fail_if(eina_list_data_get(in3) != in);
365 365
366 eo_del(in2); 366 eo_del(in2);
367 367
368 fail_if(!eo_do(out, ecore_audio_obj_out_inputs_get(&in3))); 368 eo_do(out, in3 = ecore_audio_obj_out_inputs_get());
369 369
370 fail_if(eina_list_count(in3) != 1); 370 fail_if(eina_list_count(in3) != 1);
371 fail_if(eina_list_data_get(in3) != in); 371 fail_if(eina_list_data_get(in3) != in);
372 372
373 eo_del(out); 373 eo_del(out);
374 374
375 fail_if(!eo_do(in, ecore_audio_obj_in_output_get(&out2))); 375 eo_do(in, out2 = ecore_audio_obj_in_output_get());
376 376
377 fail_if(out2); 377 fail_if(out2);
378 378
@@ -431,7 +431,7 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
431 eo_do(in, ecore_audio_obj_vio_set(&in_vio, NULL, NULL)); 431 eo_do(in, ecore_audio_obj_vio_set(&in_vio, NULL, NULL));
432 eo_do(out, ecore_audio_obj_vio_set(&out_vio, NULL, NULL)); 432 eo_do(out, ecore_audio_obj_vio_set(&out_vio, NULL, NULL));
433 433
434 eo_do(out, ecore_audio_obj_out_input_attach(in, NULL)); 434 eo_do(out, ecore_audio_obj_out_input_attach(in));
435 435
436 ecore_main_loop_begin(); 436 ecore_main_loop_begin();
437 437
@@ -464,73 +464,73 @@ START_TEST(ecore_test_ecore_audio_obj_in)
464 464
465 fail_if(!in); 465 fail_if(!in);
466 466
467 fail_if(!eo_do(in, ecore_audio_obj_vio_set(&vio, &freed, _myfree))); 467 eo_do(in, ecore_audio_obj_vio_set(&vio, &freed, _myfree));
468 fail_if(freed); 468 fail_if(freed);
469 469
470 fail_if(!eo_do(in, ecore_audio_obj_vio_set(NULL, NULL, NULL))); 470 eo_do(in, ecore_audio_obj_vio_set(NULL, NULL, NULL));
471 fail_if(!freed); 471 fail_if(!freed);
472 472
473 fail_if(!eo_do(in, ecore_audio_obj_in_speed_get(&speed))); 473 eo_do(in, speed = ecore_audio_obj_in_speed_get());
474 fail_if(speed != 1.0); 474 fail_if(speed != 1.0);
475 475
476 fail_if(!eo_do(in, ecore_audio_obj_in_speed_set(2.5))); 476 eo_do(in, ecore_audio_obj_in_speed_set(2.5));
477 477
478 fail_if(!eo_do(in, ecore_audio_obj_in_speed_get(&speed))); 478 eo_do(in, speed = ecore_audio_obj_in_speed_get());
479 fail_if(speed != 2.5); 479 fail_if(speed != 2.5);
480 480
481 fail_if(!eo_do(in, ecore_audio_obj_in_speed_set(0))); 481 eo_do(in, ecore_audio_obj_in_speed_set(0));
482 482
483 fail_if(!eo_do(in, ecore_audio_obj_in_speed_get(&speed))); 483 eo_do(in, speed = ecore_audio_obj_in_speed_get());
484 fail_if(speed != 0.2); 484 fail_if(speed != 0.2);
485 485
486 fail_if(!eo_do(in, ecore_audio_obj_in_speed_set(10))); 486 eo_do(in, ecore_audio_obj_in_speed_set(10));
487 487
488 fail_if(!eo_do(in, ecore_audio_obj_in_speed_get(&speed))); 488 eo_do(in, speed = ecore_audio_obj_in_speed_get());
489 fail_if(speed != 5.0); 489 fail_if(speed != 5.0);
490 490
491 fail_if(!eo_do(in, ecore_audio_obj_in_samplerate_get(&samplerate))); 491 eo_do(in, samplerate = ecore_audio_obj_in_samplerate_get());
492 fail_if(samplerate != 0); 492 fail_if(samplerate != 0);
493 493
494 fail_if(!eo_do(in, ecore_audio_obj_in_samplerate_set(1234))); 494 eo_do(in, ecore_audio_obj_in_samplerate_set(1234));
495 495
496 fail_if(!eo_do(in, ecore_audio_obj_in_samplerate_get(&samplerate))); 496 eo_do(in, samplerate = ecore_audio_obj_in_samplerate_get());
497 fail_if(samplerate != 1234); 497 fail_if(samplerate != 1234);
498 498
499 fail_if(!eo_do(in, ecore_audio_obj_in_channels_get(&channels))); 499 eo_do(in, channels = ecore_audio_obj_in_channels_get());
500 fail_if(channels != 0); 500 fail_if(channels != 0);
501 501
502 fail_if(!eo_do(in, ecore_audio_obj_in_channels_set(2))); 502 eo_do(in, ecore_audio_obj_in_channels_set(2));
503 503
504 fail_if(!eo_do(in, ecore_audio_obj_in_channels_get(&channels))); 504 eo_do(in, channels = ecore_audio_obj_in_channels_get());
505 fail_if(channels != 2); 505 fail_if(channels != 2);
506 506
507 fail_if(!eo_do(in, ecore_audio_obj_in_looped_get(&looped))); 507 eo_do(in, looped = ecore_audio_obj_in_looped_get());
508 fail_if(looped); 508 fail_if(looped);
509 509
510 fail_if(!eo_do(in, ecore_audio_obj_in_looped_set(EINA_TRUE))); 510 eo_do(in, ecore_audio_obj_in_looped_set(EINA_TRUE));
511 511
512 fail_if(!eo_do(in, ecore_audio_obj_in_looped_get(&looped))); 512 eo_do(in, looped = ecore_audio_obj_in_looped_get());
513 fail_if(!looped); 513 fail_if(!looped);
514 514
515 fail_if(!eo_do(in, ecore_audio_obj_in_length_get(&length))); 515 eo_do(in, length = ecore_audio_obj_in_length_get());
516 fail_if(length != 0); 516 fail_if(length != 0);
517 517
518 fail_if(eo_do(in, ecore_audio_obj_in_length_set(10.0))); 518 eo_do(in, ecore_audio_obj_in_length_set(10.0));
519 519
520 fail_if(!eo_do(in, ecore_audio_obj_in_remaining_get(&length))); 520 eo_do(in, length = ecore_audio_obj_in_remaining_get());
521 fail_if(length != -1); 521 fail_if(length != -1);
522 522
523 memset(buf, 0xaa, 10); 523 memset(buf, 0xaa, 10);
524 fail_if(!eo_do(in, ecore_audio_obj_in_read(buf, 10, &read))); 524 eo_do(in, read = ecore_audio_obj_in_read(buf, 10));
525 fail_if(read != 0); 525 fail_if(read != 0);
526 526
527 for (i=0; i<10; i++) { 527 for (i=0; i<10; i++) {
528 fail_if(buf[i] != 0xaa); 528 fail_if(buf[i] != 0xaa);
529 } 529 }
530 530
531 fail_if(!eo_do(in, ecore_audio_obj_paused_set(EINA_TRUE))); 531 eo_do(in, ecore_audio_obj_paused_set(EINA_TRUE));
532 532
533 fail_if(!eo_do(in, ecore_audio_obj_in_read(buf, 10, &read))); 533 eo_do(in, read = ecore_audio_obj_in_read(buf, 10));
534 fail_if(read != 10); 534 fail_if(read != 10);
535 535
536 for (i=0; i<10; i++) { 536 for (i=0; i<10; i++) {
@@ -560,29 +560,29 @@ START_TEST(ecore_test_ecore_audio_obj)
560 560
561 fail_if(!obj); 561 fail_if(!obj);
562 562
563 fail_if(!eo_do(obj, ecore_audio_obj_name_get(&name))); 563 eo_do(obj, name = ecore_audio_obj_name_get());
564 564
565 fail_if(name); 565 fail_if(name);
566 566
567 fail_if(!eo_do(obj, ecore_audio_obj_name_set("In1"))); 567 eo_do(obj, ecore_audio_obj_name_set("In1"));
568 fail_if(!eo_do(obj, ecore_audio_obj_name_get(&name))); 568 eo_do(obj, name = ecore_audio_obj_name_get());
569 569
570 ck_assert_str_eq(name, "In1"); 570 ck_assert_str_eq(name, "In1");
571 571
572 fail_if(!eo_do(obj, ecore_audio_obj_name_get(NULL))); 572 eo_do(obj, ecore_audio_obj_name_get());
573 573
574 fail_if(!eo_do(obj, ecore_audio_obj_paused_get(&paused))); 574 eo_do(obj, paused = ecore_audio_obj_paused_get());
575 fail_if(paused); 575 fail_if(paused);
576 576
577 fail_if(!eo_do(obj, ecore_audio_obj_paused_set(EINA_TRUE))); 577 eo_do(obj, ecore_audio_obj_paused_set(EINA_TRUE));
578 fail_if(!eo_do(obj, ecore_audio_obj_paused_get(&paused))); 578 eo_do(obj, paused = ecore_audio_obj_paused_get());
579 fail_if(!paused); 579 fail_if(!paused);
580 580
581 fail_if(!eo_do(obj, ecore_audio_obj_volume_get(&volume))); 581 eo_do(obj, volume = ecore_audio_obj_volume_get());
582 fail_if(volume != 1.0); 582 fail_if(volume != 1.0);
583 583
584 fail_if(!eo_do(obj, ecore_audio_obj_volume_set(0.5))); 584 eo_do(obj, ecore_audio_obj_volume_set(0.5));
585 fail_if(!eo_do(obj, ecore_audio_obj_volume_get(&volume))); 585 eo_do(obj, volume = ecore_audio_obj_volume_get());
586 fail_if(volume != 0.5); 586 fail_if(volume != 0.5);
587 587
588 eo_del(obj); 588 eo_del(obj);