summaryrefslogtreecommitdiff
path: root/src/lib/ecore_audio
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-05-03 17:44:01 -0300
committerRafael Antognolli <rafael.antognolli@intel.com>2013-05-03 17:44:01 -0300
commit70e882cefb2b9383d2d7d15df1bb05b6d770393c (patch)
tree5fb0cc5f334c865f1db272410dba27ec7ccbeb31 /src/lib/ecore_audio
parentd8b0c6e1da073766ce2c6fb3ff6677f7bf8c34b9 (diff)
Revert "ecore_audio: Remove old structs that we don't need anymore"
This reverts commit 96d98696849ac2b141d6eb9d68238ff8c628c1ac.
Diffstat (limited to 'src/lib/ecore_audio')
-rw-r--r--src/lib/ecore_audio/Ecore_Audio.h21
-rw-r--r--src/lib/ecore_audio/ecore_audio.c6
-rw-r--r--src/lib/ecore_audio/ecore_audio_private.h43
3 files changed, 68 insertions, 2 deletions
diff --git a/src/lib/ecore_audio/Ecore_Audio.h b/src/lib/ecore_audio/Ecore_Audio.h
index 6ba515c394..5e676348f0 100644
--- a/src/lib/ecore_audio/Ecore_Audio.h
+++ b/src/lib/ecore_audio/Ecore_Audio.h
@@ -37,6 +37,17 @@ extern "C"
37 * @{ 37 * @{
38 */ 38 */
39 39
40 /** @since 1.8
41 */
42enum _Ecore_Audio_Type {
43 ECORE_AUDIO_TYPE_PULSE, /**< Use Pulseaudio module */
44 ECORE_AUDIO_TYPE_ALSA, /**< Use ALSA module*/
45 ECORE_AUDIO_TYPE_SNDFILE, /**< Use libsndfile module */
46 ECORE_AUDIO_TYPE_TONE, /**< Use tone module */
47 ECORE_AUDIO_TYPE_CUSTOM, /**< Use custom module */
48 ECORE_AUDIO_MODULE_LAST, /**< Sentinel */
49};
50
40/** 51/**
41 * @since 1.8 52 * @since 1.8
42 */ 53 */
@@ -61,6 +72,15 @@ enum _Ecore_Audio_Format {
61typedef enum _Ecore_Audio_Format Ecore_Audio_Format; 72typedef enum _Ecore_Audio_Format Ecore_Audio_Format;
62/**< The format of the audio data */ 73/**< The format of the audio data */
63 74
75 /** @since 1.8
76 */
77typedef struct _Ecore_Audio_Module Ecore_Audio_Module;
78/**< The audio module */
79
80 /** @since 1.8
81 */
82typedef struct _Ecore_Audio_Object Ecore_Audio_Object; /**< The audio object */
83
64/* 84/*
65 * @since 1.8 85 * @since 1.8
66 */ 86 */
@@ -192,7 +212,6 @@ EAPI int ecore_audio_shutdown(void);
192 212
193#include <ecore_audio_obj_out_pulse.h> 213#include <ecore_audio_obj_out_pulse.h>
194 214
195
196#include <ecore_audio_obj_out_alsa.h> 215#include <ecore_audio_obj_out_alsa.h>
197 216
198/** 217/**
diff --git a/src/lib/ecore_audio/ecore_audio.c b/src/lib/ecore_audio/ecore_audio.c
index ae052bd9e9..4d38c13ada 100644
--- a/src/lib/ecore_audio/ecore_audio.c
+++ b/src/lib/ecore_audio/ecore_audio.c
@@ -16,6 +16,8 @@
16 16
17int _ecore_audio_log_dom = -1; 17int _ecore_audio_log_dom = -1;
18static int _ecore_audio_init_count = 0; 18static int _ecore_audio_init_count = 0;
19Eina_List *ecore_audio_modules;
20
19 21
20/* externally accessible functions */ 22/* externally accessible functions */
21 23
@@ -42,6 +44,8 @@ ecore_audio_init(void)
42 } 44 }
43 45
44 DBG("Ecore_Audio init"); 46 DBG("Ecore_Audio init");
47 ecore_audio_modules = NULL;
48
45 49
46 eina_log_timing(_ecore_audio_log_dom, 50 eina_log_timing(_ecore_audio_log_dom,
47 EINA_LOG_STATE_STOP, 51 EINA_LOG_STATE_STOP,
@@ -63,6 +67,8 @@ ecore_audio_shutdown(void)
63 EINA_LOG_STATE_SHUTDOWN); 67 EINA_LOG_STATE_SHUTDOWN);
64 68
65 69
70 eina_list_free(ecore_audio_modules);
71
66 eina_log_domain_unregister(_ecore_audio_log_dom); 72 eina_log_domain_unregister(_ecore_audio_log_dom);
67 _ecore_audio_log_dom = -1; 73 _ecore_audio_log_dom = -1;
68 74
diff --git a/src/lib/ecore_audio/ecore_audio_private.h b/src/lib/ecore_audio/ecore_audio_private.h
index 29ae400332..a28ca7c374 100644
--- a/src/lib/ecore_audio/ecore_audio_private.h
+++ b/src/lib/ecore_audio/ecore_audio_private.h
@@ -71,10 +71,26 @@ extern int _ecore_audio_log_dom;
71 * @{ 71 * @{
72 */ 72 */
73 73
74typedef struct _Ecore_Audio_Object Ecore_Audio_Object;
75typedef struct _Ecore_Audio_Input Ecore_Audio_Input; 74typedef struct _Ecore_Audio_Input Ecore_Audio_Input;
76typedef struct _Ecore_Audio_Output Ecore_Audio_Output; 75typedef struct _Ecore_Audio_Output Ecore_Audio_Output;
77 76
77/**
78 * @brief The structure representing an Ecore_Audio module
79 */
80struct _Ecore_Audio_Module
81{
82 ECORE_MAGIC;
83 Ecore_Audio_Type type;
84 char *name;
85 Eina_List *inputs;
86 Eina_List *outputs;
87
88 void *priv;
89
90 struct input_api *in_ops;
91 struct output_api *out_ops;
92};
93
78struct _Ecore_Audio_Vio_Internal { 94struct _Ecore_Audio_Vio_Internal {
79 Ecore_Audio_Vio *vio; 95 Ecore_Audio_Vio *vio;
80 void *data; 96 void *data;
@@ -126,6 +142,31 @@ struct _Ecore_Audio_Input
126 Eina_Bool ended; 142 Eina_Bool ended;
127}; 143};
128 144
145extern Eina_List *ecore_audio_modules;
146
147#ifdef HAVE_ALSA
148/* ecore_audio_alsa */
149Ecore_Audio_Module *ecore_audio_alsa_init(void);
150void ecore_audio_alsa_shutdown(void);
151#endif /* HAVE_ALSA */
152
153#ifdef HAVE_PULSE
154Ecore_Audio_Module *ecore_audio_pulse_init(void);
155void ecore_audio_pulse_shutdown(void);
156#endif /* HAVE_PULSE */
157
158#ifdef HAVE_SNDFILE
159/* ecore_audio_sndfile */
160Ecore_Audio_Module *ecore_audio_sndfile_init(void);
161void ecore_audio_sndfile_shutdown(void);
162#endif /* HAVE_SNDFILE */
163
164Ecore_Audio_Module *ecore_audio_tone_init(void);
165void ecore_audio_tone_shutdown(void);
166
167Ecore_Audio_Module *ecore_audio_custom_init(void);
168void ecore_audio_custom_shutdown(void);
169
129/** 170/**
130 * @} 171 * @}
131 */ 172 */