* @{
*/
+ /** @since 1.8
+ */
+enum _Ecore_Audio_Type {
+ ECORE_AUDIO_TYPE_PULSE, /**< Use Pulseaudio module */
+ ECORE_AUDIO_TYPE_ALSA, /**< Use ALSA module*/
+ ECORE_AUDIO_TYPE_SNDFILE, /**< Use libsndfile module */
+ ECORE_AUDIO_TYPE_TONE, /**< Use tone module */
+ ECORE_AUDIO_TYPE_CUSTOM, /**< Use custom module */
+ ECORE_AUDIO_MODULE_LAST, /**< Sentinel */
+};
+
/**
* @since 1.8
*/
typedef enum _Ecore_Audio_Format Ecore_Audio_Format;
/**< The format of the audio data */
+ /** @since 1.8
+ */
+typedef struct _Ecore_Audio_Module Ecore_Audio_Module;
+/**< The audio module */
+
+ /** @since 1.8
+ */
+typedef struct _Ecore_Audio_Object Ecore_Audio_Object; /**< The audio object */
+
/*
* @since 1.8
*/
#include <ecore_audio_obj_out_pulse.h>
-
#include <ecore_audio_obj_out_alsa.h>
/**
int _ecore_audio_log_dom = -1;
static int _ecore_audio_init_count = 0;
+Eina_List *ecore_audio_modules;
+
/* externally accessible functions */
}
DBG("Ecore_Audio init");
+ ecore_audio_modules = NULL;
+
eina_log_timing(_ecore_audio_log_dom,
EINA_LOG_STATE_STOP,
EINA_LOG_STATE_SHUTDOWN);
+ eina_list_free(ecore_audio_modules);
+
eina_log_domain_unregister(_ecore_audio_log_dom);
_ecore_audio_log_dom = -1;
* @{
*/
-typedef struct _Ecore_Audio_Object Ecore_Audio_Object;
typedef struct _Ecore_Audio_Input Ecore_Audio_Input;
typedef struct _Ecore_Audio_Output Ecore_Audio_Output;
+/**
+ * @brief The structure representing an Ecore_Audio module
+ */
+struct _Ecore_Audio_Module
+{
+ ECORE_MAGIC;
+ Ecore_Audio_Type type;
+ char *name;
+ Eina_List *inputs;
+ Eina_List *outputs;
+
+ void *priv;
+
+ struct input_api *in_ops;
+ struct output_api *out_ops;
+};
+
struct _Ecore_Audio_Vio_Internal {
Ecore_Audio_Vio *vio;
void *data;
Eina_Bool ended;
};
+extern Eina_List *ecore_audio_modules;
+
+#ifdef HAVE_ALSA
+/* ecore_audio_alsa */
+Ecore_Audio_Module *ecore_audio_alsa_init(void);
+void ecore_audio_alsa_shutdown(void);
+#endif /* HAVE_ALSA */
+
+#ifdef HAVE_PULSE
+Ecore_Audio_Module *ecore_audio_pulse_init(void);
+void ecore_audio_pulse_shutdown(void);
+#endif /* HAVE_PULSE */
+
+#ifdef HAVE_SNDFILE
+/* ecore_audio_sndfile */
+Ecore_Audio_Module *ecore_audio_sndfile_init(void);
+void ecore_audio_sndfile_shutdown(void);
+#endif /* HAVE_SNDFILE */
+
+Ecore_Audio_Module *ecore_audio_tone_init(void);
+void ecore_audio_tone_shutdown(void);
+
+Ecore_Audio_Module *ecore_audio_custom_init(void);
+void ecore_audio_custom_shutdown(void);
+
/**
* @}
*/