summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio/ecore_audio.eo
blob: df76e70bbdee2f43ab02012182bac01b3692f578 (plain)
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
type @extern Ecore.Audio.Vio: __undefined_type; [[Ecore audio vio type]] /* FIXME: Had function pointer members. */
type @extern efl_key_data_free_func: __undefined_type; [[Efl key data free function type]] /* FIXME: Function pointers not allowed. */

enum @beta Ecore.Audio.Format {
    [[Ecore audio format type]]
    auto, [[Automatically detect the format (for inputs)]]
    raw, [[RAW samples (float)]]
    wav, [[WAV format]]
    ogg, [[OGG]]
    flac, [[FLAC, the Free Lossless Audio Codec]]
    mp3,  [[MP3 (not supported)]]
    last [[Sentinel value to indicate last enum field during iteration]]
}

abstract @beta Ecore.Audio extends Efl.Object
{
   [[Convenience audio class.]]

   c_prefix: ecore_audio_obj;
   data: Ecore_Audio_Object;
   methods {
      @property paused {
         [[Pauses state of the object
         ]]
         set {
         }
         get {
         }
         values {
            paused: bool; [[$true if object is paused, $false otherwise]]
         }
      }
      @property volume {
         [[Volume of the object
         ]]
         set {
         }
         get {
         }
         values {
            volume: double; [[The volume]]
         }
      }
      @property source @pure_virtual {
         [[Source of the object

           What sources are supported depends on the actual object.
           For example, the libsndfile class accepts WAV, OGG, FLAC
           files as source.
         ]]
         set {
            return: bool; [[$true if the source was set correctly (i.e. the file
                            was opened), $false otherwise]]
         }
         get {
         }
         values {
            source: string; [[The source to set to (i.e. file, URL, device)]]
         }
      }
      @property format @pure_virtual {
         [[Format of the object.]]
         set {
            [[Sets the format of the object

              What formats are supported depends on the actual object. Default
              is ECORE_AUDIO_FORMAT_AUTO
            ]]
            return: bool; [[$true if the format was supported, $false otherwise]]
         }
         get {
            [[Gets the format of the object

              After setting the source if the format was ECORE_AUDIO_FORMAT_AUTO
              this function will now return the actual format.
            ]]
         }
         values {
            format: Ecore.Audio.Format; [[The audio format of the object]]
         }
      }
      vio_set @pure_virtual {
         [[Sets the virtual IO functions
         ]]
         params {
              vio: ptr(Ecore.Audio.Vio); [[The @Ecore.Audio.Vio struct with
                                        the function callbacks
                                      ]]
              data: void_ptr; [[User data to pass to the VIO functions]]
              free_func: efl_key_data_free_func; [[This function takes care to
                                                  clean up $data when he VIO is
                                                  destroyed. NULL means do
                                                  nothing.
                                                ]]
         }
      }
   }
   implements {
      Efl.Object.constructor;
   }
}