summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio/ecore_audio_in.eo
blob: cbf0ce843228113fadd8cf838511cd79e6a5fa24 (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
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
class Ecore_Audio_In (Ecore_Audio)
{
   legacy_prefix: null;
   eo_prefix: ecore_audio_obj_in;
   data: Ecore_Audio_Input;
      properties {
      speed {
         set {
            /*@
            Set the playback speed of the input.

            @since 1.8 */
         }
         get {
            /*@
            Get the playback speed of the input.

            @since 1.8 */
         }
         values {
            double speed; /*The speed, 1.0 is the default*/
         }
      }
      samplerate {
         set {
            /*@
            Set the sample-rate of the input

            @since 1.8 */
         }
         get {
            /*@
            Get the he sample-rate of the input

            @since 1.8 */
         }
         values {
            int samplerate; /*The samplerate in Hz*/
         }
      }
      channels {
         set {
            /*@
            Set the amount of channels the input has

            @since 1.8 */
         }
         get {
            /*@
            Get the amount of channels the input has

            @since 1.8 */
         }
         values {
            int channels; /*The number of channels*/
         }
      }
      preloaded {
         set {
            /*@
            Set the preloaded state of the input

            @since 1.8 */
         }
         get {
            /*@
            Get the the preloaded state of the input

            @since 1.8 */
         }
         values {
            bool preloaded; /*EINA_TRUE if the input should be cached, EINA_FALSE otherwise*/
         }
      }
      looped {
         set {
            /*@
            Set the looped state of the input

            If the input is looped and reaches the end it will start from the
            beginning again. At the same time the event @ref ECORE_AUDIO_EV_IN_LOOPED
            will be emitted

            @since 1.8 */
         }
         get {
            /*@
            Get the looped state of the input

            @since 1.8 */
         }
         values {
            bool looped; /*EINA_TRUE if the input should be looped, EINA_FALSE otherwise*/
         }
      }
      length {
         set {
            /*@
            Set the length of the input

            This function is only implemented by some classes
            (i.e. ECORE_AUDIO_OBJ_IN_TONE_CLASS)

            @since 1.8 */
         }
         get {
            /*@
            Get the length of the input

            @since 1.8 */
         }
         values {
            double length; /*The length of the input in seconds*/
         }
      }
      output {
         get {
            /*@
            Get the output that this input is attached to

            @since 1.8 */
         }
         values {
            Eo *output; /*The output*/
         }
      }
      remaining {
         get {
            /*@
            Get the remaining time of the input

            @since 1.8 */
         }
         values {
            double remaining; /*The amount of time in seconds left to play*/
         }
      }
   }
   methods {
      read {
         /*@
         Read from the input

         @since 1.8 */
         return: ssize; /*The amount of samples written to buf*/
         params {
            @in void *buf; /*The buffer to read into*/
            @in size len; /*The amount of samples to read*/
         }
      }
      read_internal {
         /*@
         Internal read function

         @since 1.8 */
         return: ssize; /*The amount of samples written to buf*/
         params {
            @in void *buf; /*The buffer to read into*/
            @in size len; /*The amount of samples to read*/
         }
      }
      seek {
         /*@
         Seek within the input

         @since 1.8 */
         return: double; /*The current absolute position in seconds within the input*/
         params {
            @in double offs; /*The offset in seconds*/
            @in int mode; /*mode The seek mode. Is absolute with SEEK_SET, relative to the
                            current position with SEEK_CUR and relative to the end with SEEK_END.*/
         }
      }
   }
   implements {
      Eo.Base.constructor;
      Eo.Base.destructor;
      Ecore_Audio.vio_set;
      virtual.preloaded.get;
      virtual.preloaded.set;
      virtual.seek;
      virtual.length.set;
   }
   events {
      in,looped; /*@ Called when an input has looped. */
      in,stopped; /*@ Called when an input has stopped playing. */
      in,samplerate,changed; /*@ Called when the input samplerate has changed. */
   }
}