Revert "ecore_audio: Remove old structs that we don't need anymore"
This reverts commit 96d9869684
.
This commit is contained in:
parent
d8b0c6e1da
commit
70e882cefb
|
@ -37,6 +37,17 @@ extern "C"
|
|||
* @{
|
||||
*/
|
||||
|
||||
/** @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
|
||||
*/
|
||||
|
@ -61,6 +72,15 @@ enum _Ecore_Audio_Format {
|
|||
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
|
||||
*/
|
||||
|
@ -192,7 +212,6 @@ EAPI int ecore_audio_shutdown(void);
|
|||
|
||||
#include <ecore_audio_obj_out_pulse.h>
|
||||
|
||||
|
||||
#include <ecore_audio_obj_out_alsa.h>
|
||||
|
||||
/**
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
|
||||
int _ecore_audio_log_dom = -1;
|
||||
static int _ecore_audio_init_count = 0;
|
||||
Eina_List *ecore_audio_modules;
|
||||
|
||||
|
||||
/* externally accessible functions */
|
||||
|
||||
|
@ -42,6 +44,8 @@ ecore_audio_init(void)
|
|||
}
|
||||
|
||||
DBG("Ecore_Audio init");
|
||||
ecore_audio_modules = NULL;
|
||||
|
||||
|
||||
eina_log_timing(_ecore_audio_log_dom,
|
||||
EINA_LOG_STATE_STOP,
|
||||
|
@ -63,6 +67,8 @@ ecore_audio_shutdown(void)
|
|||
EINA_LOG_STATE_SHUTDOWN);
|
||||
|
||||
|
||||
eina_list_free(ecore_audio_modules);
|
||||
|
||||
eina_log_domain_unregister(_ecore_audio_log_dom);
|
||||
_ecore_audio_log_dom = -1;
|
||||
|
||||
|
|
|
@ -71,10 +71,26 @@ extern int _ecore_audio_log_dom;
|
|||
* @{
|
||||
*/
|
||||
|
||||
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;
|
||||
|
@ -126,6 +142,31 @@ struct _Ecore_Audio_Input
|
|||
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);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue