summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_audio.c
diff options
context:
space:
mode:
authorTom Hacohen <tom@stosb.com>2016-03-09 15:47:28 +0000
committerTom Hacohen <tom@stosb.com>2016-03-09 16:09:14 +0000
commit4f949a2757b6332306264d7f126b15ba7bfd37d4 (patch)
treeec3a3aacfe34b2b3e75f3fc4d85531f6f4957c9d /src/tests/ecore/ecore_test_ecore_audio.c
parentdf83edaeb6b10324868f28e8f1910147ba22e5e5 (diff)
Automatic migration to the new eo_add syntax.
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore_audio.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index 0240903..a6589ce 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 in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL); 65 eo_add(&in, 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 out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL); 72 eo_add(&out, 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 in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL); 115 eo_add(&in, 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 out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 120 eo_add(&out, 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 in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL); 146 eo_add(&in, 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 out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 204 eo_add(&out, 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 in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL); 238 eo_add(&in, 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 out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 284 eo_add(&out, 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,9 +322,12 @@ 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 = eo_add(ECORE_AUDIO_IN_CLASS, NULL); 325 Eo *in = NULL;
326 Eo *in2 = eo_add(ECORE_AUDIO_IN_CLASS, NULL); 326 eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL);
327 Eo *out = eo_add(ECORE_AUDIO_OUT_CLASS, NULL); 327 Eo *in2 = NULL;
328 eo_add(&in2, ECORE_AUDIO_IN_CLASS, NULL);
329 Eo *out = NULL;
330 eo_add(&out, ECORE_AUDIO_OUT_CLASS, NULL);
328 331
329 fail_if(!in); 332 fail_if(!in);
330 fail_if(!in2); 333 fail_if(!in2);
@@ -420,10 +423,10 @@ START_TEST(ecore_test_ecore_audio_obj_vio)
420{ 423{
421 Eo *in, *out; 424 Eo *in, *out;
422 425
423 in = eo_add(ECORE_AUDIO_IN_CLASS, NULL); 426 eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL);
424 fail_if(!in); 427 fail_if(!in);
425 428
426 out = eo_add(ECORE_AUDIO_OUT_CLASS, NULL); 429 eo_add(&out, ECORE_AUDIO_OUT_CLASS, NULL);
427 fail_if(!out); 430 fail_if(!out);
428 431
429 ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL); 432 ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL);
@@ -458,7 +461,8 @@ START_TEST(ecore_test_ecore_audio_obj_in)
458 Ecore_Audio_Vio vio; 461 Ecore_Audio_Vio vio;
459 Eina_Bool freed = EINA_FALSE; 462 Eina_Bool freed = EINA_FALSE;
460 463
461 Eo *in = eo_add(ECORE_AUDIO_IN_CLASS, NULL); 464 Eo *in = NULL;
465 eo_add(&in, ECORE_AUDIO_IN_CLASS, NULL);
462 466
463 fail_if(!in); 467 fail_if(!in);
464 468
@@ -545,10 +549,10 @@ START_TEST(ecore_test_ecore_audio_obj)
545 double volume; 549 double volume;
546 Eo *objs[2], *obj; 550 Eo *objs[2], *obj;
547 551
548 objs[0] = eo_add(ECORE_AUDIO_IN_CLASS, NULL); 552 eo_add(&objs[0], ECORE_AUDIO_IN_CLASS, NULL);
549 fail_if(!objs[0]); 553 fail_if(!objs[0]);
550 554
551 objs[1] = eo_add(ECORE_AUDIO_OUT_CLASS, NULL); 555 eo_add(&objs[1], ECORE_AUDIO_OUT_CLASS, NULL);
552 fail_if(!objs[1]); 556 fail_if(!objs[1]);
553 557
554 for (i=0; i<2; i++) { 558 for (i=0; i<2; i++) {