From 1dab08a39e25ce7448ec53e5644fe007a67fcd83 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Fri, 12 Apr 2013 17:25:27 +0100 Subject: [PATCH] ecore_audio: Clean up the headers Signed-off-by: Daniel Willmann --- src/lib/ecore_audio/Ecore_Audio.h | 21 +-- src/lib/ecore_audio/ecore_audio_private.h | 169 ---------------------- 2 files changed, 7 insertions(+), 183 deletions(-) diff --git a/src/lib/ecore_audio/Ecore_Audio.h b/src/lib/ecore_audio/Ecore_Audio.h index 556530df49..8b7427aac0 100644 --- a/src/lib/ecore_audio/Ecore_Audio.h +++ b/src/lib/ecore_audio/Ecore_Audio.h @@ -18,12 +18,6 @@ #define EAPI #endif -#include -#include -#include - -#include - /** * @file Ecore_Audio.h * @brief Audio utility functions @@ -82,14 +76,6 @@ struct _Ecore_Audio_Vio { typedef struct _Ecore_Audio_Vio Ecore_Audio_Vio; /**< Functions to implement IO virtually */ -EAPI extern int ECORE_AUDIO_INPUT_STARTED; /**< Sound was started */ -EAPI extern int ECORE_AUDIO_INPUT_STOPPED; /**< Sound was stopped */ -EAPI extern int ECORE_AUDIO_INPUT_LOOPED; /**< Sound looped */ -EAPI extern int ECORE_AUDIO_INPUT_ENDED; /**< Sound playback ended */ -EAPI extern int ECORE_AUDIO_INPUT_PAUSED; /**< Sound paused */ -EAPI extern int ECORE_AUDIO_OUTPUT_INPUT_ADDED; /**< Input added to output */ -EAPI extern int ECORE_AUDIO_OUTPUT_INPUT_REMOVED; /**< Input removed from output */ - /* Audio operations */ /** @@ -572,4 +558,11 @@ EAPI void ecore_audio_input_callback_setup(Ecore_Audio_Object *in } #endif +#include +#include +#include + +#include +#include + #endif diff --git a/src/lib/ecore_audio/ecore_audio_private.h b/src/lib/ecore_audio/ecore_audio_private.h index 829a6155e6..67477a72be 100644 --- a/src/lib/ecore_audio/ecore_audio_private.h +++ b/src/lib/ecore_audio/ecore_audio_private.h @@ -61,9 +61,6 @@ extern int _ecore_audio_log_dom; #endif #define CRIT(...) EINA_LOG_DOM_CRIT(_ecore_audio_log_dom, __VA_ARGS__) -#define ECORE_MAGIC_AUDIO_MODULE 0xabba0001 -#define ECORE_MAGIC_AUDIO_OUTPUT 0xabba0002 -#define ECORE_MAGIC_AUDIO_INPUT 0xabba0003 /** * @defgroup Ecore_Audio_Module_API_Group Ecore_Audio_Module_API - API for modules @@ -77,140 +74,6 @@ extern int _ecore_audio_log_dom; typedef struct _Ecore_Audio_Input Ecore_Audio_Input; typedef struct _Ecore_Audio_Output Ecore_Audio_Output; -/** - * @brief Functions for inputs - */ -struct input_api -{ - /** - * @brief Create a new input - * - * @param in The input already initialized from @ref ecore_audio_input_new() - * - * @return The input, NULL on error - */ - Ecore_Audio_Object *(*input_new)(Ecore_Audio_Object *in); - - /** - * @brief Free an input - * - * @param in The input - */ - void (*input_del)(Ecore_Audio_Object *in); - - /** - * @brief Read data from an input - * - * @param in The input to read from - * @param data A pointer to a buffer where the data is put - * @param len The amount of data to read in bytes - */ - int (*input_read)(Ecore_Audio_Object *in, void *data, int len); - - /** - * @brief Seek within an input - * - * @param in The input - * @param count The amount to seek in seconds - * @param mode The mode - * - * @return The current position in seconds - * - */ - double (*input_seek)(Ecore_Audio_Object *in, double count, int mode); - - /** - * @brief Set the volume - * - * @param in the input - * @param volume the volume - */ - void (*input_volume_set)(Ecore_Audio_Object *in, double volume); - - /** - * @brief Get the volume - * - * @param in the input - * - * @return the volume - */ - double (*input_volume_get)(Ecore_Audio_Object *in); - - void (*input_looped_set)(Ecore_Audio_Object *in, Eina_Bool looped); - Eina_Bool (*input_looped_get)(Ecore_Audio_Object *in); - - void (*input_preloaded_set)(Ecore_Audio_Object *in, Eina_Bool preloaded); -}; - -/** - * @brief Functions for outputs - */ -struct output_api -{ - /** - * @brief Create a new output - * - * @param out The output already initialized from @ref ecore_audio_output_new() - * - * @return The output, NULL on error - */ - Ecore_Audio_Object *(*output_new)(Ecore_Audio_Object * out); - - /** - * @brief Free an output - * - * @param out the output - */ - void (*output_del)(Ecore_Audio_Object *out); - - /** - * @brief Set the volume of the output - * - * @param out The output - * @param vol The volume in the range of 0-255 - */ - void (*output_volume_set)(Ecore_Audio_Object *out, double vol); - - /** - * @brief Get the volume of the output - * - * @param out The output - * - * @return vol The volume - */ - double (*output_volume_get)(Ecore_Audio_Object *out); - - /** - * @brief Set the paused state of the output - * - * @param out The output - * @param paused The paused state - */ - void (*output_paused_set)(Ecore_Audio_Object *out, Eina_Bool paused); - - /** - * @brief Add an input to an output - * - * @param out The output - * @param in The input - * - * @return EINA_TRUE if the operation was successful, EINA_FALSE otherwise - */ - Eina_Bool (*output_add_input)(Ecore_Audio_Object *out, Ecore_Audio_Object *in); - - /** - * @brief Delete an input from an output - * - * @param out The output - * @param in The input - * - * @return EINA_TRUE if the operation was successful, EINA_FALSE otherwise - */ - Eina_Bool (*output_del_input)(Ecore_Audio_Object *out, Ecore_Audio_Object *in); - - void (*output_update_input_format)(Ecore_Audio_Object *out, Ecore_Audio_Object *in); -}; - /** * @brief The structure representing an Ecore_Audio module */ @@ -233,19 +96,12 @@ struct _Ecore_Audio_Module */ struct _Ecore_Audio_Object { - ECORE_MAGIC; const char *name; const char *source; - Ecore_Audio_Module *module; - Eina_Bool paused; double volume; - void *module_data; - void *obj_data; - void *user_data; - }; /** @@ -253,16 +109,8 @@ struct _Ecore_Audio_Object */ struct _Ecore_Audio_Output { - ECORE_MAGIC; - const char *name; - Ecore_Audio_Module *module; - Eina_Bool paused; - void *module_data; - void *obj_data; - void *user_data; - Eina_List *inputs; /**< The inputs that are connected to this output */ }; @@ -271,16 +119,8 @@ struct _Ecore_Audio_Output */ struct _Ecore_Audio_Input { - ECORE_MAGIC; - const char *name; - Ecore_Audio_Module *module; - Eina_Bool paused; /**< Is the input paused? */ - void *module_data; - void *obj_data; - void *user_data; - Eo *output; /**< The output this input is connected to */ int samplerate; @@ -292,15 +132,6 @@ struct _Ecore_Audio_Input Eina_Bool ended; }; -/** - * @brief The structure representing an Ecore_Audio format - */ -struct _Ecore_Audio_Format -{ - unsigned int rate; - unsigned short channels; -}; - struct _Ecore_Audio_Callback { Ecore_Audio_Read_Callback read_cb; void *data;