aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/ecore/ecore_test_ecore_audio.c
blob: 174b0718cd0944bb4f98d415dd5c634758c850af (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <math.h>

#include <Ecore_Audio.h>
#include <Ecore_File.h>

#include "ecore_suite.h"

#include <stdio.h>
#include <Ecore.h>
#include <Ecore_Audio.h>

static Eina_Bool _failed_cb(void *data, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
{
  Eina_Bool *pulse_context_failed = data;

  if (pulse_context_failed)
    {
       int pa_check = system("pulseaudio --check");
       *pulse_context_failed = (pa_check == 0);
    }
  ecore_main_loop_quit();

  return EINA_TRUE;
}

static Eina_Bool _finished_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
{
  ecore_main_loop_quit();

  return EINA_TRUE;
}

static Eina_Bool _looped_cb(void *data EINA_UNUSED, Eo *obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
{
  eo_do(obj, ecore_audio_obj_in_looped_set(obj, EINA_FALSE));

  return EINA_TRUE;
}

#ifdef HAVE_PULSE
static Eina_Bool
_seek_vol(void *data)
{
   double len = 0;
   Eo *in = data;
   Eo *out = NULL;

   eo_do(in, out = ecore_audio_obj_in_output_get(in));

   eo_do(out, ecore_audio_obj_volume_set(out, 0.4));
   eo_do(in, len = ecore_audio_obj_in_seek(in, -0.3, SEEK_END));
   fail_if(len < 0);

   return EINA_FALSE;
}

START_TEST(ecore_test_ecore_audio_obj_pulse)
{
   Eo *in, *out;
   Eina_Bool ret = EINA_FALSE;
   Eina_Bool pulse_context_failed = EINA_FALSE;

   eo_add(in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
   fail_if(!in);

   eo_do(in, ecore_audio_obj_name_set(in, "modem.wav"));
   eo_do(in, ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/modem.wav"));
   fail_if(!ret);

   eo_add(out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL);
   fail_if(!out);

   ecore_timer_add(0.3, _seek_vol, in);

   eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));
   eo_do(out, eo_event_callback_add(out, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _failed_cb, &pulse_context_failed));

   eo_do(out, ret = ecore_audio_obj_out_input_attach(out, in));
   fail_if(!ret);

   ecore_main_loop_begin();
   fail_if(pulse_context_failed);

   eo_del(out);
   eo_del(in);
}
END_TEST
#endif

static Eina_Bool _quit(void *data EINA_UNUSED)
{
  ecore_main_loop_quit();

  return EINA_FALSE;
}

static Eina_Bool
_idle_del(void *data)
{
   Eo *in = data;
   eo_del(in);
   ecore_idler_add(_quit, NULL);

   return EINA_FALSE;
}

START_TEST(ecore_test_ecore_audio_cleanup)
{
   Eo *in, *out;
   int freq = 1000;
   Eina_Bool ret = EINA_FALSE;

   eo_add(in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
   fail_if(!in);
   eo_do(in, eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq));
   eo_do(in, ecore_audio_obj_in_length_set(in, 2));

   eo_add(out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
   fail_if(!out);
   eo_do(out, ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_OGG));
   fail_if(!ret);
   eo_do(out, ret = ecore_audio_obj_source_set(out, TESTS_BUILD_DIR"/tmp.ogg"));
   fail_if(!ret);

   eo_do(out, ret = ecore_audio_obj_out_input_attach(out, in));
   fail_if(!ret);

   ecore_idler_add(_idle_del, in);

   ecore_main_loop_begin();

   ecore_file_remove(TESTS_BUILD_DIR"/tmp.ogg");
}
END_TEST

START_TEST(ecore_test_ecore_audio_obj_tone)
{
   Eo *in, *out;
   double len;
   int channel, rate, freq;
   Eina_Bool ret;
   char *tmp;

   eo_add(in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
   fail_if(!in);

   eo_do(in, ecore_audio_obj_name_set(in, "tone"));

   eo_do(in, channel = ecore_audio_obj_in_channels_get(in));
   fail_if(channel != 1);
   eo_do(in, rate = ecore_audio_obj_in_samplerate_get(in));
   fail_if(rate != 44100);
   eo_do(in, len = ecore_audio_obj_in_length_get(in));
   fail_if(len != 1);

   eo_do(in, ecore_audio_obj_in_length_set(in, 2.5));
   eo_do(in, len = ecore_audio_obj_in_length_get(in));
   fail_if(len != 2.5);

   eo_do(in, ecore_audio_obj_in_looped_set(in, EINA_TRUE));

   eo_do(in, len = ecore_audio_obj_in_remaining_get(in));
   fail_if(len != 2.5);

   eo_do(in, freq = (intptr_t) eo_key_data_get(in, ECORE_AUDIO_ATTR_TONE_FREQ));
   fail_if(freq != 1000);

   freq = 2000;
   eo_do(in, eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &freq));

   eo_do(in, freq = (intptr_t) eo_key_data_get(in, ECORE_AUDIO_ATTR_TONE_FREQ));
   fail_if(freq != 2000);

   eo_do(in, eo_key_data_set(in, "foo", "bar"));
   eo_do(in, tmp = eo_key_data_get(in, "foo"));
   ck_assert_str_eq(tmp, "bar");

   eo_do(in, len = ecore_audio_obj_in_seek(in, 5.0, SEEK_SET));
   fail_if(len != -1);

   eo_do(in, len = ecore_audio_obj_in_seek(in, 1.0, 42));
   fail_if(len != -1);

   eo_do(in, len = ecore_audio_obj_in_seek(in, 1.0, SEEK_SET));
   fail_if(len != 1.0);

   eo_do(in, len = ecore_audio_obj_in_remaining_get(in));
   fail_if(len != 1.5);

   eo_do(in, len = ecore_audio_obj_in_seek(in, 1.0, SEEK_CUR));
   fail_if(len != 2.0);

   eo_do(in, len = ecore_audio_obj_in_remaining_get(in));
   fail_if(len != 0.5);

   eo_do(in, len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END));
   fail_if(len != 1.5);

   eo_do(in, len = ecore_audio_obj_in_remaining_get(in));
   fail_if(len != 1.0);

   eo_add(out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
   fail_if(!out);

   eo_do(out, ecore_audio_obj_name_set(out, "tmp.wav"));
   eo_do(out, ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_WAV));
   fail_if(!ret);
   eo_do(out, ret = ecore_audio_obj_source_set(out, TESTS_BUILD_DIR"/tmp.wav"));
   fail_if(!ret);

   eo_do(out, ret = ecore_audio_obj_out_input_attach(out, in));
   fail_if(!ret);

   eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_LOOPED, _looped_cb, NULL));
   eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));

   ecore_main_loop_begin();

   eo_del(in);
   eo_del(out);

   //TODO: Compare and fail
   ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav");
}
END_TEST

START_TEST(ecore_test_ecore_audio_obj_sndfile)
{
   Eo *in, *out;
   double len, rem;
   int channel, rate;
   Eina_Bool ret;
   Ecore_Audio_Format fmt;
   const char *src;

   eo_add(in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL);
   fail_if(!in);

   eo_do(in, fmt = ecore_audio_obj_format_get(in));
   fail_if(fmt != ECORE_AUDIO_FORMAT_AUTO);

   eo_do(in, ret = ecore_audio_obj_format_set(in, ECORE_AUDIO_FORMAT_FLAC));
   fail_if(!ret);

   eo_do(in, fmt = ecore_audio_obj_format_get(in));
   fail_if(fmt != ECORE_AUDIO_FORMAT_FLAC);

   eo_do(in, ret = ecore_audio_obj_format_set(in, ECORE_AUDIO_FORMAT_AUTO));
   fail_if(!ret);

   eo_do(in, ecore_audio_obj_name_set(in, "sms.ogg"));
   eo_do(in, ret = ecore_audio_obj_source_set(in, TESTS_SRC_DIR"/sms.ogg"));
   fail_if(!ret);

   eo_do(in, src = ecore_audio_obj_source_get(in));
   ck_assert_str_eq(src, TESTS_SRC_DIR"/sms.ogg");

   eo_do(in, fmt = ecore_audio_obj_format_get(in));
   fail_if(fmt != ECORE_AUDIO_FORMAT_OGG);

   eo_do(in, channel = ecore_audio_obj_in_channels_get(in));
   fail_if(channel != 2);
   eo_do(in, rate = ecore_audio_obj_in_samplerate_get(in));
   fail_if(rate != 44100);
   eo_do(in, len = ecore_audio_obj_in_length_get(in));
   fail_if(len == 0);
   eo_do(in, rem = ecore_audio_obj_in_remaining_get(in));
   fail_if(len != rem);

   eo_do(in, fmt = ecore_audio_obj_format_get(in));
   fail_if(fmt != ECORE_AUDIO_FORMAT_OGG);

   eo_do(in, len = ecore_audio_obj_in_seek(in, 0.5, SEEK_SET));
   fail_if(len != 0.5);

   eo_do(in, len = ecore_audio_obj_in_seek(in, 0.5, SEEK_CUR));
   fail_if(len != 1.0);

   eo_do(in, len = ecore_audio_obj_in_seek(in, -1.0, SEEK_END));
   fail_if(fabs(rem - 1 - len) > 0.1);

   eo_add(out, ECORE_AUDIO_OUT_SNDFILE_CLASS, NULL);
   fail_if(!out);

   eo_do(out, ecore_audio_obj_name_set(out, "tmp.wav"));
   eo_do(out, ret = ecore_audio_obj_format_set(out, ECORE_AUDIO_FORMAT_WAV));
   fail_if(!ret);

   eo_do(out, fmt = ecore_audio_obj_format_get(out));
   fail_if(fmt != ECORE_AUDIO_FORMAT_WAV);


//   eo_do(out, ret = ecore_audio_obj_source_set("/tmp/file/does/not/exist/hopefully.wav"));
//   fail_if(ret);

   eo_do(out, ret = ecore_audio_obj_source_set(out, TESTS_BUILD_DIR"/tmp.wav"));
   fail_if(!ret);

   eo_do(out, src = ecore_audio_obj_source_get(out));
   ck_assert_str_eq(src, TESTS_BUILD_DIR"/tmp.wav");

   eo_do(out, ret = ecore_audio_obj_out_input_attach(out, in));
   fail_if(!ret);

   eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _finished_cb, NULL));

   ecore_main_loop_begin();

   eo_del(in);
   eo_del(out);

   //TODO: Compare and fail
   ecore_file_remove(TESTS_BUILD_DIR"/tmp.wav");
}
END_TEST

START_TEST(ecore_test_ecore_audio_obj_in_out)
{
  Eo *out2;
  Eina_List *in3;
  Eina_Bool attached;

  Eo *in;
  eo_add(in, ECORE_AUDIO_IN_CLASS, NULL);
  Eo *in2;
  eo_add(in2, ECORE_AUDIO_IN_CLASS, NULL);
  Eo *out;
  eo_add(out, ECORE_AUDIO_OUT_CLASS, NULL);

  fail_if(!in);
  fail_if(!in2);
  fail_if(!out);

  eo_do(in, out2 = ecore_audio_obj_in_output_get(in));

  fail_if(out2);

  eo_do(out, in3 = ecore_audio_obj_out_inputs_get(out));

  fail_if(eina_list_count(in3) != 0);

  eo_do(out, attached = ecore_audio_obj_out_input_attach(out, in));
  fail_if(!attached);

  eo_do(out, attached = ecore_audio_obj_out_input_attach(out, in));
  fail_if(attached);

  eo_do(in, out2 = ecore_audio_obj_in_output_get(in));

  fail_if(out2 != out);

  eo_do(out, in3 = ecore_audio_obj_out_inputs_get(out));

  fail_if(eina_list_count(in3) != 1);
  fail_if(eina_list_data_get(in3) != in);

  eo_do(out, attached = ecore_audio_obj_out_input_attach(out, in2));
  fail_if(!attached);

  eo_do(out, in3 = ecore_audio_obj_out_inputs_get(out));

  fail_if(eina_list_count(in3) != 2);
  fail_if(eina_list_data_get(in3) != in);

  eo_del(in2);

  eo_do(out, in3 = ecore_audio_obj_out_inputs_get(out));

  fail_if(eina_list_count(in3) != 1);
  fail_if(eina_list_data_get(in3) != in);

  eo_del(out);

  eo_do(in, out2 = ecore_audio_obj_in_output_get(in));

  fail_if(out2);

  eo_del(in);
}
END_TEST

static int read_cb(void *data EINA_UNUSED, Eo *eo_obj EINA_UNUSED, void *buffer, int len)
{
  static int i = 0;
  int j;
  uint8_t *buf = buffer;

  for (j=0;j<len; j++) {
      buf[j] = i++ %256;
  }
  return len;
}

static int write_cb(void *data EINA_UNUSED, Eo *eo_obj EINA_UNUSED, const void *buffer, int len)
{
  static int i = 0;
  int j;
  const uint8_t *buf = buffer;

  for (j=0;j<len; j++) {
      if (buf[j] != i%256)
        fail_if(buf[j] != i%256);
      i++;
  }

  if (i > 100000)
    ecore_main_loop_quit();

  return len;
}

Ecore_Audio_Vio in_vio = {
    .read = read_cb,
};

Ecore_Audio_Vio out_vio = {
    .write = write_cb,
};

START_TEST(ecore_test_ecore_audio_obj_vio)
{
  Eo *in, *out;

  eo_add(in, ECORE_AUDIO_IN_CLASS, NULL);
  fail_if(!in);

  eo_add(out, ECORE_AUDIO_OUT_CLASS, NULL);
  fail_if(!out);

  eo_do(in, ecore_audio_obj_vio_set(in, &in_vio, NULL, NULL));
  eo_do(out, ecore_audio_obj_vio_set(out, &out_vio, NULL, NULL));

  eo_do(out, ecore_audio_obj_out_input_attach(out, in));

  ecore_main_loop_begin();

  eo_del(out);
  eo_del(in);
}
END_TEST

static void _myfree(void *data)
{
  Eina_Bool *freed = data;

  *freed = EINA_TRUE;
}

START_TEST(ecore_test_ecore_audio_obj_in)
{
  int i;
  double speed, length;
  int samplerate, channels;
  Eina_Bool looped;

  ssize_t read;
  uint8_t buf[10];

  Ecore_Audio_Vio vio;
  Eina_Bool freed = EINA_FALSE;

  Eo *in;
  eo_add(in, ECORE_AUDIO_IN_CLASS, NULL);

  fail_if(!in);

  eo_do(in, ecore_audio_obj_vio_set(in, &vio, &freed, _myfree));
  fail_if(freed);

  eo_do(in, ecore_audio_obj_vio_set(in, NULL, NULL, NULL));
  fail_if(!freed);

  eo_do(in, speed = ecore_audio_obj_in_speed_get(in));
  fail_if(speed != 1.0);

  eo_do(in, ecore_audio_obj_in_speed_set(in, 2.5));

  eo_do(in, speed = ecore_audio_obj_in_speed_get(in));
  fail_if(speed != 2.5);

  eo_do(in, ecore_audio_obj_in_speed_set(in, 0));

  eo_do(in, speed = ecore_audio_obj_in_speed_get(in));
  fail_if(speed != 0.2);

  eo_do(in, ecore_audio_obj_in_speed_set(in, 10));

  eo_do(in, speed = ecore_audio_obj_in_speed_get(in));
  fail_if(speed != 5.0);

  eo_do(in, samplerate = ecore_audio_obj_in_samplerate_get(in));
  fail_if(samplerate != 0);

  eo_do(in, ecore_audio_obj_in_samplerate_set(in, 1234));

  eo_do(in, samplerate = ecore_audio_obj_in_samplerate_get(in));
  fail_if(samplerate != 1234);

  eo_do(in, channels = ecore_audio_obj_in_channels_get(in));
  fail_if(channels != 0);

  eo_do(in, ecore_audio_obj_in_channels_set(in, 2));

  eo_do(in, channels = ecore_audio_obj_in_channels_get(in));
  fail_if(channels != 2);

  eo_do(in, looped = ecore_audio_obj_in_looped_get(in));
  fail_if(looped);

  eo_do(in, ecore_audio_obj_in_looped_set(in, EINA_TRUE));

  eo_do(in, looped = ecore_audio_obj_in_looped_get(in));
  fail_if(!looped);

  eo_do(in, length = ecore_audio_obj_in_length_get(in));
  fail_if(length != 0);

  eo_do(in, length = ecore_audio_obj_in_remaining_get(in));
  fail_if(length != -1);

  memset(buf, 0xaa, 10);
  eo_do(in, read = ecore_audio_obj_in_read(in, buf, 10));
  fail_if(read != 0);

  for (i=0; i<10; i++) {
      fail_if(buf[i] != 0xaa);
  }

  eo_do(in, ecore_audio_obj_paused_set(in, EINA_TRUE));

  eo_do(in, read = ecore_audio_obj_in_read(in, buf, 10));
  fail_if(read != 10);

  for (i=0; i<10; i++) {
      fail_if(buf[i] != 0x00);
  }

  eo_del(in);
}
END_TEST

START_TEST(ecore_test_ecore_audio_obj)
{
  int i;
  const char *name;
  Eina_Bool paused;
  double volume;
  Eo *objs[2], *obj;

  eo_add(objs[0], ECORE_AUDIO_IN_CLASS, NULL);
  fail_if(!objs[0]);

  eo_add(objs[1], ECORE_AUDIO_OUT_CLASS, NULL);
  fail_if(!objs[1]);

  for (i=0; i<2; i++) {
    obj = objs[i];

    fail_if(!obj);

    eo_do(obj, name = ecore_audio_obj_name_get(obj));

    fail_if(name);

    eo_do(obj, ecore_audio_obj_name_set(obj, "In1"));
    eo_do(obj, name = ecore_audio_obj_name_get(obj));

    ck_assert_str_eq(name, "In1");

    eo_do(obj, ecore_audio_obj_name_get(obj));

    eo_do(obj, paused = ecore_audio_obj_paused_get(obj));
    fail_if(paused);

    eo_do(obj, ecore_audio_obj_paused_set(obj, EINA_TRUE));
    eo_do(obj, paused = ecore_audio_obj_paused_get(obj));
    fail_if(!paused);

    eo_do(obj, volume = ecore_audio_obj_volume_get(obj));
    fail_if(volume != 1.0);

    eo_do(obj, ecore_audio_obj_volume_set(obj, 0.5));
    eo_do(obj, volume = ecore_audio_obj_volume_get(obj));
    fail_if(volume != 0.5);

    eo_del(obj);
  }

}
END_TEST

START_TEST(ecore_test_ecore_audio_init)
{
   int ret;

   ret = ecore_audio_init();
   ck_assert_int_eq(ret, 2);

   ret = ecore_audio_shutdown();
   ck_assert_int_eq(ret, 1);

}
END_TEST

void setup(void)
{
   int ret;

   ret = eina_init();
   ck_assert_int_eq(ret, 1);

   ret = ecore_init();
   fail_if(ret < 1);

   ret = ecore_audio_init();
   ck_assert_int_eq(ret, 1);
}

void teardown(void)
{
   ecore_audio_shutdown();
   ecore_shutdown();
   eina_shutdown();
}

void
ecore_test_ecore_audio(TCase *tc)
{
   tcase_add_checked_fixture (tc, setup, teardown);

   tcase_add_test(tc, ecore_test_ecore_audio_init);

   tcase_add_test(tc, ecore_test_ecore_audio_obj);
   tcase_add_test(tc, ecore_test_ecore_audio_obj_in);
   tcase_add_test(tc, ecore_test_ecore_audio_obj_vio);
   tcase_add_test(tc, ecore_test_ecore_audio_obj_in_out);
   tcase_add_test(tc, ecore_test_ecore_audio_obj_tone);

#ifdef HAVE_SNDFILE
   tcase_add_test(tc, ecore_test_ecore_audio_obj_sndfile);
   tcase_add_test(tc, ecore_test_ecore_audio_cleanup);
#endif
#ifdef HAVE_PULSE
   tcase_add_test(tc, ecore_test_ecore_audio_obj_pulse);
#endif

/*
   tcase_add_test(tc, ecore_test_ecore_audio_default);
   tcase_add_test(tc, ecore_test_ecore_audio_sndfile_vio);
   tcase_add_test(tc, ecore_test_ecore_audio_custom);
*/
}