summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio/ecore_audio_obj_in.h
diff options
context:
space:
mode:
authorDaniel Willmann <d.willmann@samsung.com>2013-05-01 17:41:54 +0100
committerDaniel Willmann <d.willmann@samsung.com>2013-05-01 17:41:54 +0100
commita101ad286763fad63170013884595d8de8382ccc (patch)
treec5a30ddf688ac7cdc30bfcce37fe36a87478363e /src/lib/ecore_audio/ecore_audio_obj_in.h
parentc249dc8cee016f933f132e1e5b652db81046b50d (diff)
ecore_audio: Add documentation for ecore_audio_obj_in
Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_audio/ecore_audio_obj_in.h170
1 files changed, 157 insertions, 13 deletions
diff --git a/src/lib/ecore_audio/ecore_audio_obj_in.h b/src/lib/ecore_audio/ecore_audio_obj_in.h
index 1a7d702982..b0b26eaafb 100644
--- a/src/lib/ecore_audio/ecore_audio_obj_in.h
+++ b/src/lib/ecore_audio/ecore_audio_obj_in.h
@@ -20,7 +20,7 @@
20 20
21/** 21/**
22 * @file ecore_audio_obj_in.h 22 * @file ecore_audio_obj_in.h
23 * @brief Audio Input Object 23 * @brief Ecore_Audio Input 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_in - Ecore_Audio input object
33 * @ingroup Ecore_Audio_Group
33 * @{ 34 * @{
34 */ 35 */
35 36
36#define ECORE_AUDIO_OBJ_IN_CLASS ecore_audio_obj_in_class_get() 37#define ECORE_AUDIO_OBJ_IN_CLASS ecore_audio_obj_in_class_get() /**< Ecore_Audio input 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_in_class_get() EINA_CONST; 44const Eo_Class *ecore_audio_obj_in_class_get() EINA_CONST;
39 45
40extern EAPI Eo_Op ECORE_AUDIO_OBJ_IN_BASE_ID; 46extern EAPI Eo_Op ECORE_AUDIO_OBJ_IN_BASE_ID;
@@ -63,62 +69,200 @@ enum Ecore_Audio_Obj_In_Sub_Ids
63 69
64#define ECORE_AUDIO_OBJ_IN_ID(sub_id) (ECORE_AUDIO_OBJ_IN_BASE_ID + EO_TYPECHECK(enum Ecore_Audio_Obj_In_Sub_Ids, sub_id)) 70#define ECORE_AUDIO_OBJ_IN_ID(sub_id) (ECORE_AUDIO_OBJ_IN_BASE_ID + EO_TYPECHECK(enum Ecore_Audio_Obj_In_Sub_Ids, sub_id))
65 71
66/* 72/**
67 * @def ecore_audio_obj_in_speed_set 73 * @brief Set the playback speed of the input
68 * @since 1.8
69 * 74 *
70 * Sets the playback speed of the input 75 * @since 1.8
71 * 76 *
72 * @param[in] speed 77 * @param[in] speed The speed, 1.0 is the default
73 */ 78 */
74#define ecore_audio_obj_in_speed_set(speed) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SPEED_SET), EO_TYPECHECK(double, speed) 79#define ecore_audio_obj_in_speed_set(speed) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SPEED_SET), EO_TYPECHECK(double, speed)
75 80
76/* 81/**
77 * @def ecore_audio_obj_in_speed_get 82 * @brief Get the playback speed of the input
83 *
78 * @since 1.8 84 * @since 1.8
79 * 85 *
80 * Gets the playback speed of the input 86 * This will trigger the ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED event.
81 * 87 *
82 * @param[out] speed 88 * @param[out] speed The speed
83 */ 89 */
84#define ecore_audio_obj_in_speed_get(speed) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SPEED_GET), EO_TYPECHECK(double *, speed) 90#define ecore_audio_obj_in_speed_get(speed) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SPEED_GET), EO_TYPECHECK(double *, speed)
85 91
86 92/**
93 * @brief Set the sample-rate of the input
94 *
95 * @since 1.8
96 *
97 * This will trigger the ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED event.
98 *
99 * @param[in] samplerate The samplerate in Hz
100 */
87#define ecore_audio_obj_in_samplerate_set(samplerate) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SAMPLERATE_SET), EO_TYPECHECK(int, samplerate) 101#define ecore_audio_obj_in_samplerate_set(samplerate) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SAMPLERATE_SET), EO_TYPECHECK(int, samplerate)
88 102
103/**
104 * @brief Get the sample-rate of the input
105 *
106 * @since 1.8
107 *
108 * @param[out] samplerate The samplerate in Hz
109 */
89#define ecore_audio_obj_in_samplerate_get(samplerate) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SAMPLERATE_GET), EO_TYPECHECK(int *, samplerate) 110#define ecore_audio_obj_in_samplerate_get(samplerate) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SAMPLERATE_GET), EO_TYPECHECK(int *, samplerate)
90 111
112/**
113 * @brief Set the amount of channels the input has
114 *
115 * @since 1.8
116 *
117 * @param[in] channels The number of channels
118 */
91#define ecore_audio_obj_in_channels_set(channels) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_CHANNELS_SET), EO_TYPECHECK(int, channels) 119#define ecore_audio_obj_in_channels_set(channels) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_CHANNELS_SET), EO_TYPECHECK(int, channels)
92 120
121/**
122 * @brief Get the amount of channels the input has
123 *
124 * @since 1.8
125 *
126 * @param[out] channels The number of channels
127 */
93#define ecore_audio_obj_in_channels_get(channels) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_CHANNELS_GET), EO_TYPECHECK(int *, channels) 128#define ecore_audio_obj_in_channels_get(channels) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_CHANNELS_GET), EO_TYPECHECK(int *, channels)
94 129
130/**
131 * @brief Set the preloaded state of the input
132 *
133 * @since 1.8
134 *
135 * @param[in] preloaded EINA_TRUE if the input should be cached, EINA_FALSE otherwise
136 */
95#define ecore_audio_obj_in_preloaded_set(preloaded) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_PRELOADED_SET), EO_TYPECHECK(Eina_Bool, preloaded) 137#define ecore_audio_obj_in_preloaded_set(preloaded) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_PRELOADED_SET), EO_TYPECHECK(Eina_Bool, preloaded)
96 138
139/**
140 * @brief Get the preloaded state of the input
141 *
142 * @since 1.8
143 *
144 * @param[out] preloaded EINA_TRUE if the input is cached, EINA_FALSE otherwise
145 */
97#define ecore_audio_obj_in_preloaded_get(preloaded) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_PRELOADED_GET), EO_TYPECHECK(Eina_Bool *, preloaded) 146#define ecore_audio_obj_in_preloaded_get(preloaded) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_PRELOADED_GET), EO_TYPECHECK(Eina_Bool *, preloaded)
98 147
148/**
149 * @brief Set the looped state of the input
150 *
151 * @since 1.8
152 *
153 * If the input is looped and reaches the end it will start from the
154 * beginning again. At the same time the event @ref ECORE_AUDIO_EV_IN_LOOPED
155 * will be emitted
156 *
157 * @param[in] looped EINA_TRUE if the input should be looped, EINA_FALSE otherwise
158 */
99#define ecore_audio_obj_in_looped_set(looped) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_LOOPED_SET), EO_TYPECHECK(Eina_Bool, looped) 159#define ecore_audio_obj_in_looped_set(looped) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_LOOPED_SET), EO_TYPECHECK(Eina_Bool, looped)
100 160
161/**
162 * @brief Get the looped state of the input
163 *
164 * @since 1.8
165 *
166 * @see ecore_audio_obj_in_looped_set
167 *
168 * @param[out] looped EINA_TRUE if the input is looped, EINA_FALSE otherwise
169 */
101#define ecore_audio_obj_in_looped_get(ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_LOOPED_GET), EO_TYPECHECK(Eina_Bool *, ret) 170#define ecore_audio_obj_in_looped_get(ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_LOOPED_GET), EO_TYPECHECK(Eina_Bool *, ret)
102 171
172/**
173 * @brief Set the length of the input
174 *
175 * @since 1.8
176 *
177 * This function is only implemented by some classes
178 * (i.e. ECORE_AUDIO_OBJ_IN_TONE_CLASS)
179 *
180 * @param[in] length The length of the input in seconds
181 */
103#define ecore_audio_obj_in_length_set(length) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_LENGTH_SET), EO_TYPECHECK(double, length) 182#define ecore_audio_obj_in_length_set(length) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_LENGTH_SET), EO_TYPECHECK(double, length)
104 183
184/**
185 * @brief Get the length of the input
186 *
187 * @since 1.8
188 *
189 * @param[out] ret The length of the input in seconds
190 */
105#define ecore_audio_obj_in_length_get(ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_LENGTH_GET), EO_TYPECHECK(double *, ret) 191#define ecore_audio_obj_in_length_get(ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_LENGTH_GET), EO_TYPECHECK(double *, ret)
106 192
193/**
194 * @brief Read from the input
195 *
196 * @since 1.8
197 *
198 * @param[out] buf The buffer to read into
199 * @param[in] len The amount of samples to read
200 * @param[out] ret The amount of samples written to buf
201 */
107#define ecore_audio_obj_in_read(buf, len, ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_READ), EO_TYPECHECK(void *, buf), EO_TYPECHECK(size_t, len), EO_TYPECHECK(ssize_t *, ret) 202#define ecore_audio_obj_in_read(buf, len, ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_READ), EO_TYPECHECK(void *, buf), EO_TYPECHECK(size_t, len), EO_TYPECHECK(ssize_t *, ret)
108 203
204/**
205 * @brief Seek within the input
206 *
207 * @since 1.8
208 *
209 * @param[in] offs The offset in seconds
210 * @param[in] mode The seek mode. Is absolute with SEEK_SET, relative to the
211 * current position with SEEK_CUR and relative to the end with SEEK_END.
212 * @param[out] ret The current absolute position in seconds within the input
213 */
109#define ecore_audio_obj_in_seek(offs, mode, ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SEEK), EO_TYPECHECK(double, offs), EO_TYPECHECK(int, mode), EO_TYPECHECK(double *, ret) 214#define ecore_audio_obj_in_seek(offs, mode, ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_SEEK), EO_TYPECHECK(double, offs), EO_TYPECHECK(int, mode), EO_TYPECHECK(double *, ret)
110 215
216/**
217 * @brief Get the output that this input is attached to
218 *
219 * @since 1.8
220 *
221 * @param[out] ret The output
222 */
111#define ecore_audio_obj_in_output_get(ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_OUTPUT_GET), EO_TYPECHECK(Eo **, ret) 223#define ecore_audio_obj_in_output_get(ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_OUTPUT_GET), EO_TYPECHECK(Eo **, ret)
112 224
225/**
226 * @brief Get the remaining time of the input
227 *
228 * @param[out] ret The amount of time in seconds left to play
229 */
113#define ecore_audio_obj_in_remaining_get(ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_REMAINING_GET), EO_TYPECHECK(double *, ret) 230#define ecore_audio_obj_in_remaining_get(ret) ECORE_AUDIO_OBJ_IN_ID(ECORE_AUDIO_OBJ_IN_SUB_ID_REMAINING_GET), EO_TYPECHECK(double *, ret)
114 231
115extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_LOOPED; 232extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_LOOPED;
233
234/**
235 * @brief The input looped
236 *
237 * @since 1.8
238 *
239 * Emitted when @ref ecore_audio_obj_in_looped_set is set to EINA_TRUE and
240 * the input restarted playing after reaching the end.
241 */
116#define ECORE_AUDIO_EV_IN_LOOPED (&(_ECORE_AUDIO_EV_IN_LOOPED)) 242#define ECORE_AUDIO_EV_IN_LOOPED (&(_ECORE_AUDIO_EV_IN_LOOPED))
117 243
118extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_STOPPED; 244extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_STOPPED;
245
246/**
247 * @brief The input stopped playing
248 *
249 * @since 1.8
250 *
251 * Emitted when the input stopped playing after reaching the end.
252 */
119#define ECORE_AUDIO_EV_IN_STOPPED (&(_ECORE_AUDIO_EV_IN_STOPPED)) 253#define ECORE_AUDIO_EV_IN_STOPPED (&(_ECORE_AUDIO_EV_IN_STOPPED))
120 254
121extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED; 255extern const Eo_Event_Description _ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED;
256
257/**
258 * @brief The sample rate changed
259 *
260 * @since 1.8
261 *
262 * Emitted when the samplerate changed - this can happen if you call
263 * @ref ecore_audio_obj_in_samplerate_set or
264 * @ref ecore_audio_obj_in_speed_set.
265 */
122#define ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED (&(_ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED)) 266#define ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED (&(_ECORE_AUDIO_EV_IN_SAMPLERATE_CHANGED))
123 267
124/** 268/**