summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-05-01 16:26:49 +0100
committerDaniel Willmann <d.willmann@samsung.com>2013-05-01 17:36:19 +0100
commitc249dc8cee016f933f132e1e5b652db81046b50d (patch)
treee50ccd4a45ca4c7b67b70e191df70a4786f47ee6 /src/lib/ecore_audio
parent5dde3b3bfd1356c5e961f985219f0d30de67c2a1 (diff)
ecore_audio: Update documentation and document ecore_audio_obj
Remove old unused function declarations Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Diffstat (limited to 'src/lib/ecore_audio')
-rw-r--r--src/lib/ecore_audio/Ecore_Audio.h560
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj.h110
-rw-r--r--src/lib/ecore_audio/ecore_audio_private.h10
3 files changed, 196 insertions, 484 deletions
diff --git a/src/lib/ecore_audio/Ecore_Audio.h b/src/lib/ecore_audio/Ecore_Audio.h
index c40514091c..212a4f398b 100644
--- a/src/lib/ecore_audio/Ecore_Audio.h
+++ b/src/lib/ecore_audio/Ecore_Audio.h
@@ -31,7 +31,11 @@ extern "C"
31/** 31/**
32 * @defgroup Ecore_Audio_Group Ecore_Audio - Convenience audio API 32 * @defgroup Ecore_Audio_Group Ecore_Audio - Convenience audio API
33 * @ingroup Ecore 33 * @ingroup Ecore
34 * 34
35 @section Classes
36 Ecore_Audio provides the following Eo classes:
37 @li @ref ecore_audio_obj
38
35 * @since 1.8 39 * @since 1.8
36 * 40 *
37 * @{ 41 * @{
@@ -48,18 +52,27 @@ enum _Ecore_Audio_Type {
48 ECORE_AUDIO_MODULE_LAST, /**< Sentinel */ 52 ECORE_AUDIO_MODULE_LAST, /**< Sentinel */
49}; 53};
50 54
55/**
56 * @since 1.8
57 */
58typedef enum _Ecore_Audio_Type Ecore_Audio_Type;
59
60/**
61 * @since 1.8
62 */
51enum _Ecore_Audio_Format { 63enum _Ecore_Audio_Format {
52 ECORE_AUDIO_FORMAT_AUTO, 64 ECORE_AUDIO_FORMAT_AUTO, /**< Automatically detect the format (for inputs) */
53 ECORE_AUDIO_FORMAT_RAW, 65 ECORE_AUDIO_FORMAT_RAW, /**< RAW samples (float) */
54 ECORE_AUDIO_FORMAT_WAV, 66 ECORE_AUDIO_FORMAT_WAV, /**< WAV format */
55 ECORE_AUDIO_FORMAT_OGG, 67 ECORE_AUDIO_FORMAT_OGG, /**< OGG */
56 ECORE_AUDIO_FORMAT_FLAC, 68 ECORE_AUDIO_FORMAT_FLAC, /**< FLAC, the Free Lossless Audio Codec */
57 ECORE_AUDIO_FORMAT_MP3, 69 ECORE_AUDIO_FORMAT_MP3, /**< MP3 (not supported) */
58 ECORE_AUDIO_FORMAT_LAST 70 ECORE_AUDIO_FORMAT_LAST /**< Sentinel value, do not use */
59}; 71};
60 72
61typedef enum _Ecore_Audio_Type Ecore_Audio_Type; 73 /*
62 74 * @since 1.8
75 */
63typedef enum _Ecore_Audio_Format Ecore_Audio_Format; 76typedef enum _Ecore_Audio_Format Ecore_Audio_Format;
64/**< The format of the audio data */ 77/**< The format of the audio data */
65 78
@@ -72,18 +85,88 @@ typedef struct _Ecore_Audio_Module Ecore_Audio_Module;
72 */ 85 */
73typedef struct _Ecore_Audio_Object Ecore_Audio_Object; /**< The audio object */ 86typedef struct _Ecore_Audio_Object Ecore_Audio_Object; /**< The audio object */
74 87
75 88/*
76typedef int (*Ecore_Audio_Read_Callback)(void *user_data, void *data, int len); 89 * @since 1.8
77 90 */
78struct _Ecore_Audio_Vio { 91struct _Ecore_Audio_Vio {
92 /**
93 * @brief Get the length of the file
94 *
95 * @param data User data from the ecore_audio_obj_set_vio call
96 * @param eo_obj The Ecore_Audio object this operates on
97 *
98 * @return The length of the virtual file in bytes
99 *
100 * @since 1.8
101 */
79 int (*get_length)(void *data, Eo *eo_obj); 102 int (*get_length)(void *data, Eo *eo_obj);
103
104 /**
105 * @brief Seek to a position within the file
106 *
107 * @param data User data from the ecore_audio_obj_set_vio call
108 * @param eo_obj The Ecore_Audio object this operates on
109 * @param offset The number of bytes to move (can be negative)
110 * @param whence Accepts the same values as fseek(), which are:
111 * SEEK_SET: offset is absolute
112 * SEEK_CUR: offset is relative to the current position
113 * SEEK_END: offset is relative to the end
114 *
115 * @return The resulting position from the start of the file (in bytes)
116 * or -1 if an error occured (i.e. out of bounds)
117 *
118 * @since 1.8
119 */
80 int (*seek)(void *data, Eo *eo_obj, int offset, int whence); 120 int (*seek)(void *data, Eo *eo_obj, int offset, int whence);
121
122 /**
123 * @brief Get the current position within the file
124 *
125 * @param data User data from the ecore_audio_obj_set_vio call
126 * @param eo_obj The Ecore_Audio object this operates on
127 *
128 * @return The resulting position from the start of the file (in bytes)
129 *
130 * This is equivalent to calling seek() with offset 0 and whence SEEK_CUR.
131 *
132 * @since 1.8
133 */
81 int (*tell)(void *data, Eo *eo_obj); 134 int (*tell)(void *data, Eo *eo_obj);
135
136 /**
137 * @brief Read some data from the file
138 *
139 * @param data User data from the ecore_audio_obj_set_vio call
140 * @param eo_obj The Ecore_Audio object this operates on
141 * @param[out] buffer the buffer to write the data to
142 * @param length The number of bytes to read
143 *
144 * @return The number of bytes read from the file. May be less than length
145 *
146 * @since 1.8
147 */
82 int (*read)(void *data, Eo *eo_obj, void *buffer, int length); 148 int (*read)(void *data, Eo *eo_obj, void *buffer, int length);
149
150 /**
151 * @brief Write some data to the file
152 *
153 * @param data User data from the ecore_audio_obj_set_vio call
154 * @param eo_obj The Ecore_Audio object this operates on
155 * @param buffer Write data from here to the file
156 * @param length The number of bytes to write
157 *
158 * @return The number of bytes written to the file. May be less than length
159 *
160 * @since 1.8
161 */
83 int (*write)(void *data, Eo *eo_obj, const void *buffer, int length); 162 int (*write)(void *data, Eo *eo_obj, const void *buffer, int length);
84}; 163};
85 164
86typedef struct _Ecore_Audio_Vio Ecore_Audio_Vio; /**< Functions to implement IO virtually */ 165/**
166 * @brief Holds the callback functions to implement virtual file IO
167 * @since 1.8
168 */
169typedef struct _Ecore_Audio_Vio Ecore_Audio_Vio;
87 170
88/* Audio operations */ 171/* Audio operations */
89 172
@@ -118,451 +201,6 @@ EAPI int ecore_audio_init(void);
118EAPI int ecore_audio_shutdown(void); 201EAPI int ecore_audio_shutdown(void);
119 202
120 203
121/* Output operations*/
122
123/**
124 * @brief Create a new Ecore_Audio_Output instance
125 *
126 * @param name the name of the output to create
127 * @return a new instance or NULL on error
128 *
129 * @since 1.8
130 */
131EAPI Ecore_Audio_Object *ecore_audio_output_add(Ecore_Audio_Type type);
132
133/**
134 * @brief Set the name of an output
135 *
136 * @param output The output
137 * @param name The name
138 *
139 * @since 1.8
140 */
141EAPI void ecore_audio_output_name_set(Ecore_Audio_Object *output, const char *name);
142
143/**
144 * @brief Get the name of an output
145 *
146 * @param output the output
147 *
148 * @return the name of the output
149 *
150 * @since 1.8
151 */
152EAPI const char *ecore_audio_output_name_get(Ecore_Audio_Object *output);
153
154/**
155 * @brief Free an @ref Ecore_Audio_Output instance
156 *
157 * @param out the output
158 *
159 * @since 1.8
160 */
161EAPI void ecore_audio_output_del(Ecore_Audio_Object *output);
162
163/**
164 * @brief Set the user data pointer
165 *
166 * @param output The output
167 * @param data The pointer to set
168 *
169 * @since 1.8
170 */
171EAPI void ecore_audio_output_data_set(Ecore_Audio_Object *output, void *data);
172
173/**
174 * @brief Get the user data pointer
175 *
176 * @param output The output
177 *
178 * @return The pointer to the user data
179 *
180 * @since 1.8
181 */
182EAPI void *ecore_audio_output_data_get(Ecore_Audio_Object *output);
183
184/**
185 * @brief Set the volume of the output
186 *
187 * @param out the output
188 * @param volume the volume
189 *
190 * @since 1.8
191 */
192EAPI void ecore_audio_output_volume_set(Ecore_Audio_Object *output, double volume);
193
194/**
195 * @brief Get the volume of the output
196 *
197 * @param out the output
198 *
199 * @return the volume
200 *
201 * @since 1.8
202 */
203EAPI double ecore_audio_output_volume_get(Ecore_Audio_Object *output);
204
205/**
206 * @brief Set the paused state of an output
207 *
208 * @param out the output
209 * @param paused the paused state
210 *
211 * @since 1.8
212 */
213EAPI void ecore_audio_output_paused_set(Ecore_Audio_Object *output, Eina_Bool paused);
214
215/**
216 * @brief Get the paused state of an output
217 *
218 * @param out the output
219 *
220 * @return the paused state
221 *
222 * @since 1.8
223 */
224EAPI Eina_Bool ecore_audio_output_paused_get(Ecore_Audio_Object *output);
225
226/**
227 * @brief Add an input to an output.
228 *
229 * @param out the output
230 * @param in the input
231 *
232 * @return True if connecting was successful, False otherwise
233 *
234 * @since 1.8
235 */
236EAPI Eina_Bool ecore_audio_output_input_add(Ecore_Audio_Object *output, Ecore_Audio_Object *input);
237
238/**
239 * @brief Disconnect an input from an output. This will stop playback of the
240 * input.
241 *
242 * @param out the output
243 * @param in the input
244 *
245 * @return True if disconnecting was successful, False otherwise
246 *
247 * @since 1.8
248 */
249EAPI Eina_Bool ecore_audio_output_input_del(Ecore_Audio_Object *output, Ecore_Audio_Object *input);
250
251/**
252 * @brief Get the inputs connected to an output.
253 *
254 * @param out the output
255 *
256 * @return A list of Ecore_Audio_Input that are connected to the output
257 *
258 * @since 1.8
259 */
260EAPI Eina_List *ecore_audio_output_inputs_get(Ecore_Audio_Object *output);
261
262/**
263 * @brief Set up an input to play after another input.
264 *
265 * @param out the output
266 * @param after the input relative to which the other input will be chained
267 * @param in the input to chain
268 *
269 * @return True if chaining was successful, False otherwise
270 *
271 * @since 1.8
272 */
273EAPI Eina_Bool ecore_audio_output_input_chain_after(Ecore_Audio_Object *output, Ecore_Audio_Object *input, Ecore_Audio_Object *after);
274
275
276/* Input operations*/
277
278/**
279 * @brief Create a new Ecore_Audio_Input instance
280 *
281 * @param name the name of the input to create
282 * @return a new instance or NULL on error
283 *
284 * @since 1.8
285 */
286EAPI Ecore_Audio_Object *ecore_audio_input_add(Ecore_Audio_Type type);
287
288/**
289 * @brief Get the name of an input
290 *
291 * @param input the input
292 *
293 * @return the name of the input
294 *
295 * @since 1.8
296 */
297EAPI const char *ecore_audio_input_name_get(Ecore_Audio_Object *input);
298
299/**
300 * @brief Set the name of an input
301 *
302 * @param input the input
303 * @param name The name to set
304 *
305 * @since 1.8
306 */
307EAPI void ecore_audio_input_name_set(Ecore_Audio_Object *input, const char *name);
308
309/**
310 * @brief Free an @ref Ecore_Audio_Input instance
311 *
312 * @param in the input
313 *
314 * @since 1.8
315 */
316EAPI void ecore_audio_input_del(Ecore_Audio_Object *input);
317
318/**
319 * @brief Set the user data pointer
320 *
321 * @param input The input
322 * @param data The pointer to set
323 *
324 * @since 1.8
325 */
326EAPI void ecore_audio_input_data_set(Ecore_Audio_Object *input, void *data);
327
328/**
329 * @brief Get the user data pointer
330 *
331 * @param input The input
332 *
333 * @return The pointer to the user data
334 *
335 * @since 1.8
336 */
337EAPI void *ecore_audio_input_data_get(Ecore_Audio_Object *input);
338
339/**
340 * @brief Get the sample rate of the input
341 *
342 * @param input The input
343 *
344 * @return The samplerate in Hz
345 *
346 * @since 1.8
347 */
348EAPI int ecore_audio_input_samplerate_get(Ecore_Audio_Object *input);
349
350/**
351 * @brief Set the sample rate of the input
352 *
353 * @param input The input
354 * @param samplerate The sample rate in Hz
355 *
356 * @since 1.8
357 */
358EAPI void ecore_audio_input_samplerate_set(Ecore_Audio_Object *input, int samplerate);
359
360/**
361 * @brief Get the speed the input is played back at
362 *
363 * @param input The input
364 *
365 * @return The speed
366 *
367 * @since 1.8
368 */
369EAPI double ecore_audio_input_speed_get(Ecore_Audio_Object *input);
370
371/**
372 * @brief Set the speed the input is played back at
373 *
374 * @param input The input
375 * @param samplerate The speed (1.0 is normal speed)
376 *
377 * @since 1.8
378 */
379EAPI void ecore_audio_input_speed_set(Ecore_Audio_Object *input, double speed);
380
381/**
382 * @brief Get the channels of the input
383 *
384 * @param input The input
385 *
386 * @return The number of channels
387 *
388 * @since 1.8
389 */
390EAPI int ecore_audio_input_channels_get(Ecore_Audio_Object *input);
391
392/**
393 * @brief Set the amount of channels in the input
394 *
395 * @param input The input
396 * @param channels The number of channels to set
397 *
398 * @since 1.8
399 */
400EAPI void ecore_audio_input_channels_set(Ecore_Audio_Object *input, int channels);
401
402/**
403 * @brief Seek within an input stream
404 *
405 * @param in the input
406 * @offset the offset in seconds
407 * @mode seek mode (SEEK_SET, SEEK_END, or SEEK_CUR)
408 * @return the current offset
409 *
410 * @since 1.8
411 */
412EAPI double ecore_audio_input_seek(Ecore_Audio_Object *input, double offset, int mode);
413
414/**
415 * @brief Read data from an input stream
416 *
417 * @param in the input
418 * @param data the buffer to write the audio data into
419 * @param len the size of the buffer
420 *
421 * @return the number of bytes that were read
422 *
423 * @since 1.8
424 */
425EAPI int ecore_audio_input_read(Ecore_Audio_Object *input, void *data, int len);
426
427/**
428 * @brief Get the paused state of an input
429 *
430 * @param in the input
431 * @return EINA_TRUE if the input is paused, EINA_FALSE otherwise
432 *
433 * @since 1.8
434 */
435EAPI Eina_Bool ecore_audio_input_paused_get(Ecore_Audio_Object *input);
436
437/**
438 * @brief Set the paused state of an input
439 *
440 * @param in the input
441 * @param paused the paused state to set
442 *
443 * @since 1.8
444 *
445 * If paused is EINA_TRUE if the input is paused, if it is EINA_FALSE the
446 * input plays normally.
447 */
448EAPI void ecore_audio_input_paused_set(Ecore_Audio_Object *input, Eina_Bool paused);
449
450/**
451 * @brief Set the volume of the input
452 *
453 * @param in the input
454 * @param volume the volume
455 *
456 * @since 1.8
457 */
458EAPI void ecore_audio_input_volume_set(Ecore_Audio_Object *input, double volume);
459
460/**
461 * @brief Get the volume of the input
462 *
463 * @param in the input
464 *
465 * @return the volume
466 *
467 * @since 1.8
468 */
469EAPI double ecore_audio_input_volume_get(Ecore_Audio_Object *input);
470
471/**
472 * @brief Set whether the input loops
473 *
474 * @param in the input
475 * @param looped if the input should loop
476 *
477 * @since 1.8
478 */
479EAPI void ecore_audio_input_looped_set(Ecore_Audio_Object *input, Eina_Bool looped);
480
481/**
482 * @brief Get whether the input loops
483 *
484 * @param in the input
485 *
486 * @return if the input loops
487 *
488 * @since 1.8
489 */
490EAPI Eina_Bool ecore_audio_input_looped_get(Ecore_Audio_Object *input);
491
492/**
493 * @brief Get the length of the input in seconds
494 *
495 * @param in the input
496 *
497 * @return the length in seconds
498 *
499 * @since 1.8
500 */
501EAPI double ecore_audio_input_length_get(Ecore_Audio_Object *input);
502
503/**
504 * @brief Set whether the input is preloaded
505 *
506 * @param in the input
507 * @param preloaded if the input is preloaded
508 *
509 * @since 1.8
510 */
511EAPI void ecore_audio_input_preloaded_set(Ecore_Audio_Object *input, Eina_Bool preloaded);
512
513/**
514 * @brief Get whether the input is preloaded
515 *
516 * @param in the input
517 *
518 * @return EINA_TRUE if the input is preloaded, otherwise EINA_FALSE
519 *
520 * @since 1.8
521 */
522EAPI Eina_Bool ecore_audio_input_preloaded_get(Ecore_Audio_Object *input);
523
524/**
525 * @brief Get the outputs this input is connected to
526 *
527 * @param in the input
528 *
529 * @return A list of outputs
530 *
531 * @since 1.8
532 */
533EAPI Ecore_Audio_Object *ecore_audio_input_output_get(Ecore_Audio_Object *input);
534
535/**
536 * @brief Get the remaining time of the input
537 *
538 * @param in the input
539 *
540 * @return The remaining time in seconds
541 *
542 * @since 1.8
543 */
544EAPI double ecore_audio_input_remaining_get(Ecore_Audio_Object *input);
545
546/* libsndfile */
547
548EAPI void ecore_audio_input_sndfile_filename_set(Ecore_Audio_Object *input, const char *filename);
549EAPI void ecore_audio_input_sndfile_format_set(Ecore_Audio_Object *input, int format);
550EAPI void ecore_audio_input_sndfile_vio_set(Ecore_Audio_Object *input, Ecore_Audio_Vio *vio);
551
552EAPI void ecore_audio_output_sndfile_filename_set(Ecore_Audio_Object *output, const char *filename);
553EAPI void ecore_audio_output_sndfile_format_set(Ecore_Audio_Object *output, int format);
554EAPI void ecore_audio_output_sndfile_vio_set(Ecore_Audio_Object *output, Ecore_Audio_Vio *vio);
555
556/* tone */
557EAPI void ecore_audio_input_tone_frequency_set(Ecore_Audio_Object *input, int frequency);
558EAPI void ecore_audio_input_tone_duration_set(Ecore_Audio_Object *input, double duration);
559
560EAPI void ecore_audio_input_callback_setup(Ecore_Audio_Object *input, Ecore_Audio_Read_Callback read_cb, void *data);
561
562/**
563 * @}
564 */
565
566#ifdef __cplusplus 204#ifdef __cplusplus
567} 205}
568#endif 206#endif
@@ -578,4 +216,8 @@ EAPI void ecore_audio_input_callback_setup(Ecore_Audio_Object *in
578 216
579#include <ecore_audio_obj_out_pulse.h> 217#include <ecore_audio_obj_out_pulse.h>
580 218
219/**
220 * @}
221 */
222
581#endif 223#endif
diff --git a/src/lib/ecore_audio/ecore_audio_obj.h b/src/lib/ecore_audio/ecore_audio_obj.h
index 625aad5ed6..fc8d8ebb2f 100644
--- a/src/lib/ecore_audio/ecore_audio_obj.h
+++ b/src/lib/ecore_audio/ecore_audio_obj.h
@@ -20,7 +20,7 @@
20 20
21/** 21/**
22 * @file ecore_audio_obj.h 22 * @file ecore_audio_obj.h
23 * @brief Audio Object 23 * @brief Base Ecore_Audio object
24 */ 24 */
25 25
26#ifdef __cplusplus 26#ifdef __cplusplus
@@ -29,12 +29,18 @@ extern "C"
29#endif 29#endif
30 30
31/** 31/**
32 * @addtogroup Ecore_Audio_Group 32 * @defgroup ecore_audio_obj - Base Ecore_Audio object
33 * @ingroup Ecore_Audio_Group
33 * @{ 34 * @{
34 */ 35 */
35 36
36#define ECORE_AUDIO_OBJ_CLASS ecore_audio_obj_class_get() 37#define ECORE_AUDIO_OBJ_CLASS ecore_audio_obj_class_get() /**< Ecore_Audio object class */
37 38
39/**
40 * @brief Get the Eo class ID
41 *
42 * @return The Eo class ID
43 */
38const Eo_Class *ecore_audio_obj_class_get() EINA_CONST; 44const Eo_Class *ecore_audio_obj_class_get() EINA_CONST;
39 45
40extern EAPI Eo_Op ECORE_AUDIO_OBJ_BASE_ID; 46extern EAPI Eo_Op ECORE_AUDIO_OBJ_BASE_ID;
@@ -57,48 +63,122 @@ enum Ecore_Audio_Obj_Sub_Ids
57 63
58#define ECORE_AUDIO_OBJ_ID(sub_id) (ECORE_AUDIO_OBJ_BASE_ID + EO_TYPECHECK(enum Ecore_Audio_Obj_Sub_Ids, sub_id)) 64#define ECORE_AUDIO_OBJ_ID(sub_id) (ECORE_AUDIO_OBJ_BASE_ID + EO_TYPECHECK(enum Ecore_Audio_Obj_Sub_Ids, sub_id))
59 65
60/* 66/**
61 * @def ecore_audio_obj_name_set 67 * @brief Set the name of the object
62 * @since 1.8
63 * 68 *
64 * Sets the name of the object 69 * @since 1.8
65 * 70 *
66 * @param[in] name 71 * @param[in] name
67 */ 72 */
68#define ecore_audio_obj_name_set(name) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_NAME_SET), EO_TYPECHECK(const char *, name) 73#define ecore_audio_obj_name_set(name) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_NAME_SET), EO_TYPECHECK(const char *, name)
69 74
70/* 75/**
71 * @def ecore_audio_obj_name_get 76 * @brief Get the name of the object
72 * @since 1.8
73 * 77 *
74 * Gets the name of the object 78 * @since 1.8
75 * 79 *
76 * @param[out] name 80 * @param[out] ret
77 */ 81 */
78#define ecore_audio_obj_name_get(name) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_NAME_GET), EO_TYPECHECK(const char **, name) 82#define ecore_audio_obj_name_get(ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_NAME_GET), EO_TYPECHECK(const char **, ret)
79 83
84/**
85 * @brief Set the paused state of the object
86 *
87 * @since 1.8
88 *
89 * @param[in] paused EINA_TRUE to pause the object, EINA_FALSE to resume
90 */
80#define ecore_audio_obj_paused_set(paused) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_PAUSED_SET), EO_TYPECHECK(Eina_Bool, paused) 91#define ecore_audio_obj_paused_set(paused) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_PAUSED_SET), EO_TYPECHECK(Eina_Bool, paused)
81 92
93/**
94 * @brief Get the paused state of the object
95 *
96 * @since 1.8
97 *
98 * @param[out] ret EINA_TRUE if object is paused, EINA_FALSE if not
99 */
82#define ecore_audio_obj_paused_get(ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_PAUSED_GET), EO_TYPECHECK(Eina_Bool *, ret) 100#define ecore_audio_obj_paused_get(ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_PAUSED_GET), EO_TYPECHECK(Eina_Bool *, ret)
83 101
102/**
103 * @brief Set the volume of the object
104 *
105 * @since 1.8
106 *
107 * @param[in] volume The volume, 1.0 is the default, can be > 1.0
108 */
84#define ecore_audio_obj_volume_set(volume) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_VOLUME_SET), EO_TYPECHECK(double, volume) 109#define ecore_audio_obj_volume_set(volume) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_VOLUME_SET), EO_TYPECHECK(double, volume)
85 110
111/**
112 * @brief Get the volume of the object
113 *
114 * @since 1.8
115 *
116 * @param[out] ret The volume
117 */
86#define ecore_audio_obj_volume_get(ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_VOLUME_GET), EO_TYPECHECK(double *, ret) 118#define ecore_audio_obj_volume_get(ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_VOLUME_GET), EO_TYPECHECK(double *, ret)
87 119
120/**
121 * @brief Set the source of an object
122 *
123 * @since 1.8
124 *
125 * What sources are supported depends on the actual object. For example,
126 * the libsndfile class accepts WAV, OGG, FLAC files as source.
127 *
128 * @param[in] source The source to set to (i.e. file, URL, device)
129 * @param[out] ret EINA_TRUE if the source was set correctly (i.e. the file was opened), EINA_FALSE otherwise
130 */
88#define ecore_audio_obj_source_set(source, ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_SOURCE_SET), EO_TYPECHECK(const char *, source), EO_TYPECHECK(Eina_Bool *, ret) 131#define ecore_audio_obj_source_set(source, ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_SOURCE_SET), EO_TYPECHECK(const char *, source), EO_TYPECHECK(Eina_Bool *, ret)
89 132
90#define ecore_audio_obj_source_get(source) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_SOURCE_GET), EO_TYPECHECK(const char **, source) 133/**
134 * @brief Get the source of an object
135 *
136 * @since 1.8
137 *
138 * @param[out] ret The currently set source
139 */
140#define ecore_audio_obj_source_get(ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_SOURCE_GET), EO_TYPECHECK(const char **, ret)
91 141
142/**
143 * @brief Set the format of an object
144 *
145 * @since 1.8
146 *
147 * What formats are supported depends on the actual object. Default is
148 * ECORE_AUDIO_FORMAT_AUTO
149 *
150 * @param[in] format The format to set, of type Ecore_Audio_Format
151 * @param[out] ret EINA_TRUE if the format was supported, EINA_FALSE otherwise
152 */
92#define ecore_audio_obj_format_set(format, ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_FORMAT_SET), EO_TYPECHECK(Ecore_Audio_Format, format), EO_TYPECHECK(Eina_Bool *, ret) 153#define ecore_audio_obj_format_set(format, ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_FORMAT_SET), EO_TYPECHECK(Ecore_Audio_Format, format), EO_TYPECHECK(Eina_Bool *, ret)
93 154
155/**
156 * @brief Get the format of an object
157 *
158 * @since 1.8
159 *
160 * After setting the source if the format was ECORE_AUDIO_FORMAT_AUTO this
161 * function will now return the actual format.
162 *
163 * @param[out] ret The format of the object
164 */
94#define ecore_audio_obj_format_get(ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_FORMAT_GET), EO_TYPECHECK(Ecore_Audio_Format *, ret) 165#define ecore_audio_obj_format_get(ret) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_FORMAT_GET), EO_TYPECHECK(Ecore_Audio_Format *, ret)
95 166
167/**
168 * @brief Set the virtual IO functions
169 *
170 * @since 1.8
171 *
172 * @param[in] vio The @ref Ecore_Audio_Vio struct with the function callbacks
173 * @param[in] data User data to pass to the VIO functions
174 * @param[in] free_func This function takes care to clean up @ref data when
175 * the VIO is destroyed. NULL means do nothing.
176 */
96#define ecore_audio_obj_vio_set(vio, data, free_func) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_VIO_SET), EO_TYPECHECK(Ecore_Audio_Vio *, vio), EO_TYPECHECK(void *, data), EO_TYPECHECK(eo_base_data_free_func, free_func) 177#define ecore_audio_obj_vio_set(vio, data, free_func) ECORE_AUDIO_OBJ_ID(ECORE_AUDIO_OBJ_SUB_ID_VIO_SET), EO_TYPECHECK(Ecore_Audio_Vio *, vio), EO_TYPECHECK(void *, data), EO_TYPECHECK(eo_base_data_free_func, free_func)
97 178
98/** 179/**
99 * @} 180 * @}
100 */ 181 */
101
102#ifdef __cplusplus 182#ifdef __cplusplus
103} 183}
104#endif 184#endif
diff --git a/src/lib/ecore_audio/ecore_audio_private.h b/src/lib/ecore_audio/ecore_audio_private.h
index f634beabe2..35afa85f4c 100644
--- a/src/lib/ecore_audio/ecore_audio_private.h
+++ b/src/lib/ecore_audio/ecore_audio_private.h
@@ -142,11 +142,6 @@ struct _Ecore_Audio_Input
142 Eina_Bool ended; 142 Eina_Bool ended;
143}; 143};
144 144
145struct _Ecore_Audio_Callback {
146 Ecore_Audio_Read_Callback read_cb;
147 void *data;
148};
149
150extern Eina_List *ecore_audio_modules; 145extern Eina_List *ecore_audio_modules;
151 146
152#ifdef HAVE_ALSA 147#ifdef HAVE_ALSA
@@ -170,11 +165,6 @@ void ecore_audio_pulse_shutdown(void);
170 165
171#ifdef HAVE_SNDFILE 166#ifdef HAVE_SNDFILE
172/* ecore_audio_sndfile */ 167/* ecore_audio_sndfile */
173struct _Ecore_Audio_Sndfile_Private
174{
175 SF_VIRTUAL_IO vio_wrapper;
176};
177
178Ecore_Audio_Module *ecore_audio_sndfile_init(void); 168Ecore_Audio_Module *ecore_audio_sndfile_init(void);
179void ecore_audio_sndfile_shutdown(void); 169void ecore_audio_sndfile_shutdown(void);
180#endif /* HAVE_SNDFILE */ 170#endif /* HAVE_SNDFILE */