summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_audio.c
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-04-23 17:10:16 +0100
committerDaniel Willmann <d.willmann@samsung.com>2013-04-23 17:13:39 +0100
commit97d4b50c91adcb8b779f5449b27e2265f2f243f0 (patch)
tree4528951705a4f945f451401a04db900be02e58c2 /src/tests/ecore/ecore_test_ecore_audio.c
parent4e3804041f8e865e007b2a6a0d45a05f39500c3b (diff)
ecore_audio: Add more return values for methods, catch up with API
input_attach, input_detach, format_set, and source_set now return an Eina_Bool Tests, examples and edje_multisense adapted Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Diffstat (limited to 'src/tests/ecore/ecore_test_ecore_audio.c')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index c70b9be..8c6623c 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -315,6 +315,7 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
315 Eo *in, *out; 315 Eo *in, *out;
316 double len; 316 double len;
317 int channel, rate, freq; 317 int channel, rate, freq;
318 Eina_Bool ret;
318 319
319 in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL); 320 in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
320 fail_if(!in); 321 fail_if(!in);
@@ -366,10 +367,13 @@ START_TEST(ecore_test_ecore_audio_obj_tone)
366 fail_if(!out); 367 fail_if(!out);
367 368
368 eo_do(out, ecore_audio_obj_name_set("tmp.wav")); 369 eo_do(out, ecore_audio_obj_name_set("tmp.wav"));
369 eo_do(out, ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_WAV)); 370 eo_do(out, ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_WAV, &ret));
370 eo_do(out, ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.wav")); 371 fail_if(!ret);
372 eo_do(out, ecore_audio_obj_source_set(TESTS_BUILD_DIR"/tmp.wav", &ret));
373 fail_if(!ret);
371 374
372 eo_do(out, ecore_audio_obj_out_input_attach(in, NULL)); 375 eo_do(out, ecore_audio_obj_out_input_attach(in, &ret));
376 fail_if(!ret);
373 377
374 eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _finished_cb, NULL)); 378 eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _finished_cb, NULL));
375 379
@@ -388,12 +392,14 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
388 Eo *in; 392 Eo *in;
389 double len, rem; 393 double len, rem;
390 int channel, rate; 394 int channel, rate;
395 Eina_Bool ret;
391 396
392 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL); 397 in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
393 fail_if(!in); 398 fail_if(!in);
394 399
395 eo_do(in, ecore_audio_obj_name_set("sms.ogg")); 400 eo_do(in, ecore_audio_obj_name_set("sms.ogg"));
396 eo_do(in, ecore_audio_obj_source_set(TESTS_SRC_DIR"/sms.ogg")); 401 eo_do(in, ecore_audio_obj_source_set(TESTS_SRC_DIR"/sms.ogg", &ret));
402 fail_if(!ret);
397 403
398 eo_do(in, ecore_audio_obj_in_channels_get(&channel)); 404 eo_do(in, ecore_audio_obj_in_channels_get(&channel));
399 fail_if(channel != 2); 405 fail_if(channel != 2);
@@ -445,7 +451,8 @@ START_TEST(ecore_test_ecore_audio_obj_in_out)
445 fail_if(eina_list_count(in3) != 1); 451 fail_if(eina_list_count(in3) != 1);
446 fail_if(eina_list_data_get(in3) != in); 452 fail_if(eina_list_data_get(in3) != in);
447 453
448 fail_if(!eo_do(out, ecore_audio_obj_out_input_attach(in2, NULL))); 454 fail_if(!eo_do(out, ecore_audio_obj_out_input_attach(in2, &attached)));
455 fail_if(!attached);
449 456
450 fail_if(!eo_do(out, ecore_audio_obj_out_inputs_get(&in3))); 457 fail_if(!eo_do(out, ecore_audio_obj_out_inputs_get(&in3)));
451 458
@@ -639,9 +646,15 @@ ecore_test_ecore_audio(TCase *tc)
639 tcase_add_test(tc, ecore_test_ecore_audio_obj); 646 tcase_add_test(tc, ecore_test_ecore_audio_obj);
640 tcase_add_test(tc, ecore_test_ecore_audio_obj_in); 647 tcase_add_test(tc, ecore_test_ecore_audio_obj_in);
641 tcase_add_test(tc, ecore_test_ecore_audio_obj_in_out); 648 tcase_add_test(tc, ecore_test_ecore_audio_obj_in_out);
642 tcase_add_test(tc, ecore_test_ecore_audio_obj_sndfile);
643 tcase_add_test(tc, ecore_test_ecore_audio_obj_tone); 649 tcase_add_test(tc, ecore_test_ecore_audio_obj_tone);
644 650
651#ifdef HAVE_SNDFILE
652 tcase_add_test(tc, ecore_test_ecore_audio_obj_sndfile);
653#endif
654#ifdef HAVE_PUSE
655 tcase_add_test(tc, ecore_test_ecore_audio_obj_pulse);
656#endif
657
645/* 658/*
646 tcase_add_test(tc, ecore_test_ecore_audio_default); 659 tcase_add_test(tc, ecore_test_ecore_audio_default);
647 tcase_add_test(tc, ecore_test_ecore_audio_sndfile_vio); 660 tcase_add_test(tc, ecore_test_ecore_audio_sndfile_vio);