summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_audio.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-11 12:24:08 +0000
committerTom Hacohen <tom@stosb.com>2016-03-11 12:29:03 +0000
commitf24210caac8d50940ddef858994571be59179c10 (patch)
treecfc8b264e77abbab9827517d1827f9a4fb4dcd50 /src/tests/ecore/ecore_test_ecore_audio.c
parent9fdac37187e35f45570c3808011d0283c658652d (diff)
Revert "Automatic migration to the new eo_add syntax."
This reverts commit 4f949a2757b6332306264d7f126b15ba7bfd37d4.
Diffstat (limited to '')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index a6589ce..0240903 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -62,14 +62,14 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
62 Eina_Bool ret = EINA_FALSE; 62 Eina_Bool ret = EINA_FALSE;
63 Eina_Bool pulse_context_failed = EINA_FALSE; 63 Eina_Bool pulse_context_failed = EINA_FALSE;
64 64
65 eo_add(&in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL); 65 in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
66 fail_if(!in); 66 fail_if(!in);
67 67
68 ecore_audio_obj_name_set(in, "modem.wav"); 68 ecore_audio_obj_name_set(in, "modem.wav");
69 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/modem.wav"); 69 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/modem.wav");
70 fail_if(!ret); 70 fail_if(!ret);
71 71
72 eo_add(&out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL); 72 out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL);
73 fail_if(!out); 73 fail_if(!out);
74 74
75 ecore_timer_add(0.3, _seek_vol, in); 75 ecore_timer_add(0.3, _seek_vol, in);
@@ -112,12 +112,12 @@ START_TEST(ecore_test_ecore_audio_cleanup)
112 int freq = 1000; 112 int freq = 1000;
113 Eina_Bool ret = EINA_FALSE; 113 Eina_Bool ret = EINA_FALSE;
114 114
115 eo_add(&in, ECORE_AUDIO_IN_TONE_CLASS, NULL); 115 in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
116 fail_if(!in); 116 fail_if(!in);
117 eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq); 117 eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq);
118 ecore_audio_obj_in_length_set(in, 2); 118 ecore_audio_obj_in_length_set(in, 2);
119 119
120 eo_add(&out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 120 out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
121 fail_if(!out); 121 fail_if(!out);
122 ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_OGG); 122 ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_OGG);
123 fail_if(!ret); 123 fail_if(!ret);
@@ -143,7 +143,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
143 Eina_Bool ret; 143 Eina_Bool ret;
144 char *tmp; 144 char *tmp;
145 145
146 eo_add(&in, ECORE_AUDIO_IN_TONE_CLASS, NULL); 146 in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
147 fail_if(!in); 147 fail_if(!in);
148 148
149 ecore_audio_obj_name_set(in, "tone"); 149 ecore_audio_obj_name_set(in, "tone");
@@ -201,7 +201,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
201 len = ecore_audio_obj_in_remaining_get(in); 201 len = ecore_audio_obj_in_remaining_get(in);
202 fail_if(len != 1.0); 202 fail_if(len != 1.0);
203 203
204 eo_add(&out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 204 out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
205 fail_if(!out); 205 fail_if(!out);
206 206
207 ecore_audio_obj_name_set(out, "tmp.wav"); 207 ecore_audio_obj_name_set(out, "tmp.wav");
@@ -235,7 +235,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
235 Ecore_Audio_Format fmt; 235 Ecore_Audio_Format fmt;
236 const char *src; 236 const char *src;
237 237
238 eo_add(&in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL); 238 in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
239 fail_if(!in); 239 fail_if(!in);
240 240
241 fmt = ecore_audio_obj_format_get(in); 241 fmt = ecore_audio_obj_format_get(in);
@@ -281,7 +281,7 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
281 len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END); 281 len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END);
282 fail_if(fabs(rem - 1 - len) > 0.1); 282 fail_if(fabs(rem - 1 - len) > 0.1);
283 283
284 eo_add(&out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 284 out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
285 fail_if(!out); 285 fail_if(!out);
286 286
287 ecore_audio_obj_name_set(out, "tmp.wav"); 287 ecore_audio_obj_name_set(out, "tmp.wav");
@@ -322,12 +322,9 @@ START_TEST(ecore_test_ecore_audio_obj_in_out)
322 Eina_List *in3; 322 Eina_List *in3;
323 Eina_Bool attached; 323 Eina_Bool attached;
324 324
325 Eo *in = NULL; 325 Eo *in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
326 eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL); 326 Eo *in2 = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
327 Eo *in2 = NULL; 327 Eo *out = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
328 eo_add(&in2, ECORE_AUDIO_IN_CLASS, NULL);
329 Eo *out = NULL;
330 eo_add(&out, ECORE_AUDIO_OUT_CLASS, NULL);
331 328
332 fail_if(!in); 329 fail_if(!in);
333 fail_if(!in2); 330 fail_if(!in2);
@@ -423,10 +420,10 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
423{ 420{
424 Eo *in, *out; 421 Eo *in, *out;
425 422
426 eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL); 423 in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
427 fail_if(!in); 424 fail_if(!in);
428 425
429 eo_add(&out, ECORE_AUDIO_OUT_CLASS, NULL); 426 out = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
430 fail_if(!out); 427 fail_if(!out);
431 428
432 ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL); 429 ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL);
@@ -461,8 +458,7 @@ START_TEST(ecore_test_ecore_audio_obj_in)
461 Ecore_Audio_Vio vio; 458 Ecore_Audio_Vio vio;
462 Eina_Bool freed = EINA_FALSE; 459 Eina_Bool freed = EINA_FALSE;
463 460
464 Eo *in = NULL; 461 Eo *in = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
465 eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL);
466 462
467 fail_if(!in); 463 fail_if(!in);
468 464
@@ -549,10 +545,10 @@ START_TEST(ecore_test_ecore_audio_obj)
549 double volume; 545 double volume;
550 Eo *objs[2], *obj; 546 Eo *objs[2], *obj;
551 547
552 eo_add(&objs[0], ECORE_AUDIO_IN_CLASS, NULL); 548 objs[0] = eo_add(ECORE_AUDIO_IN_CLASS, NULL);
553 fail_if(!objs[0]); 549 fail_if(!objs[0]);
554 550
555 eo_add(&objs[1], ECORE_AUDIO_OUT_CLASS, NULL); 551 objs[1] = eo_add(ECORE_AUDIO_OUT_CLASS, NULL);
556 fail_if(!objs[1]); 552 fail_if(!objs[1]);
557 553
558 for (i=0; i<2; i++) { 554 for (i=0; i<2; i++) {