summaryrefslogtreecommitdiff
path: root/src/tests/ecore/ecore_test_ecore_audio.c
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-18 01:39:45 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-05-18 02:02:45 +0900
commit54272809ed1d8d2d3f083826574710c7d05784ed (patch)
tree23c46f89ccef94ed03c6304aa295282a1bb8c0ca /src/tests/ecore/ecore_test_ecore_audio.c
parent9e04c6824fd5ae6b4b4e3fa214b2ca0cb78adc86 (diff)
ecore audio test - improve samples for ecore audio test
Diffstat (limited to '')
-rw-r--r--src/tests/ecore/ecore_test_ecore_audio.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/tests/ecore/ecore_test_ecore_audio.c b/src/tests/ecore/ecore_test_ecore_audio.c
index e3410ae..9112b89 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -65,14 +65,14 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
65 in = eo_add(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, "sample.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"/sample.wav");
70 fail_if(!ret); 70 fail_if(!ret);
71 71
72 out = eo_add(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(1.8, _seek_vol, in);
76 76
77 eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL); 77 eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL);
78 eo_event_callback_add(out, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _failed_cb, &pulse_context_failed); 78 eo_event_callback_add(out, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _failed_cb, &pulse_context_failed);
@@ -250,12 +250,12 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
250 ret = ecore_audio_obj_format_set(in, ECORE_AUDIO_FORMAT_AUTO); 250 ret = ecore_audio_obj_format_set(in, ECORE_AUDIO_FORMAT_AUTO);
251 fail_if(!ret); 251 fail_if(!ret);
252 252
253 ecore_audio_obj_name_set(in, "sms.ogg"); 253 ecore_audio_obj_name_set(in, "sample.ogg");
254 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sms.ogg"); 254 ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sample.ogg");
255 fail_if(!ret); 255 fail_if(!ret);
256 256
257 src = ecore_audio_obj_source_get(in); 257 src = ecore_audio_obj_source_get(in);
258 ck_assert_str_eq(src, TESTS_SRC_DIR"/sms.ogg"); 258 ck_assert_str_eq(src, TESTS_SRC_DIR"/sample.ogg");
259 259
260 fmt = ecore_audio_obj_format_get(in); 260 fmt = ecore_audio_obj_format_get(in);
261 fail_if(fmt != ECORE_AUDIO_FORMAT_OGG); 261 fail_if(fmt != ECORE_AUDIO_FORMAT_OGG);
@@ -275,11 +275,11 @@ START_TEST(ecore_test_ecore_audio_obj_sndfile)
275 len = ecore_audio_obj_in_seek(in, 0.5, SEEK_SET); 275 len = ecore_audio_obj_in_seek(in, 0.5, SEEK_SET);
276 fail_if(len != 0.5); 276 fail_if(len != 0.5);
277 277
278 len = ecore_audio_obj_in_seek(in, 0.5, SEEK_CUR); 278 len = ecore_audio_obj_in_seek(in, 1.0, SEEK_CUR);
279 fail_if(len != 1.0); 279 fail_if(len != 1.5);
280 280
281 len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END); 281 len = ecore_audio_obj_in_seek(in, -1.5, SEEK_END);
282 fail_if(fabs(rem - 1 - len) > 0.1); 282 fail_if(fabs(rem - 1 - len) > 0.6);
283 283
284 out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL); 284 out = eo_add(ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
285 fail_if(!out); 285 fail_if(!out);