summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio_out/Makefile.am15
-rw-r--r--src/audio_out/audio_esd_out.c59
2 files changed, 56 insertions, 18 deletions
diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am
index 234ab098a..3af71def1 100644
--- a/src/audio_out/Makefile.am
+++ b/src/audio_out/Makefile.am
@@ -19,9 +19,9 @@ alsa_module = xineplug_ao_out_alsa.la
endif
endif
-#if HAVE_ESD
-#esd_module = xineplug_ao_out_esd.la
-#endif
+if HAVE_ESD
+esd_module = xineplug_ao_out_esd.la
+endif
if HAVE_SUNAUDIO
sun_module = xineplug_ao_out_sun.la
@@ -44,7 +44,8 @@ endif
lib_LTLIBRARIES = $(oss_module) \
$(alsa_module) \
$(sun_module) \
- $(arts_module)
+ $(arts_module) \
+ $(esd_module)
#lib_LTLIBRARIES = \
# $(alsa_module) \
@@ -61,9 +62,9 @@ xineplug_ao_out_alsa_la_SOURCES = audio_alsa_out.c
xineplug_ao_out_alsa_la_LIBADD = $(ALSA_LIBS)
xineplug_ao_out_alsa_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
-#xineplug_ao_out_esd_la_SOURCES = audio_esd_out.c
-#xineplug_ao_out_esd_la_LIBADD = $(ESD_LIBS)
-#xineplug_ao_out_esd_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
+xineplug_ao_out_esd_la_SOURCES = audio_esd_out.c
+xineplug_ao_out_esd_la_LIBADD = $(ESD_LIBS)
+xineplug_ao_out_esd_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
xineplug_ao_out_sun_la_SOURCES = audio_sun_out.c
xineplug_ao_out_sun_la_LDFLAGS = -avoid-version -module @XINE_PLUGIN_MIN_SYMS@
diff --git a/src/audio_out/audio_esd_out.c b/src/audio_out/audio_esd_out.c
index 2eb93a1f5..1cbd6bb94 100644
--- a/src/audio_out/audio_esd_out.c
+++ b/src/audio_out/audio_esd_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_esd_out.c,v 1.22 2002/11/20 11:57:39 mroi Exp $
+ * $Id: audio_esd_out.c,v 1.23 2002/11/26 02:37:35 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -39,7 +39,7 @@
#include "audio_out.h"
#include "metronom.h"
-#define AO_OUT_ESD_IFACE_VERSION 4
+#define AO_OUT_ESD_IFACE_VERSION 6
#define GAP_TOLERANCE 5000
@@ -72,6 +72,12 @@ typedef struct esd_driver_s {
} esd_driver_t;
+typedef struct {
+ audio_driver_class_t driver_class;
+
+ config_values_t *config;
+} esd_class_t;
+
/*
* connect to esd
@@ -362,9 +368,11 @@ static int ao_esd_ctrl(ao_driver_t *this_gen, int cmd, ...) {
return 0;
}
-static void *init_audio_out_plugin (xine_t *xine, void *data) {
+static ao_driver_t *open_plugin (audio_driver_class_t *class_gen,
+ const void *data) {
- config_values_t *config = xine->config;
+ esd_class_t *class = (esd_class_t *) class_gen;
+ config_values_t *config = class->config;
esd_driver_t *this;
int audio_fd;
sigset_t vo_mask, vo_mask_orig;
@@ -431,22 +439,51 @@ static void *init_audio_out_plugin (xine_t *xine, void *data) {
return this;
}
+/*
+ * class functions
+ */
+
+static char* get_identifier (audio_driver_class_t *this_gen) {
+ return "esd";
+}
+
+static char* get_description (audio_driver_class_t *this_gen) {
+ return _("xine audio output plugin using esound");
+}
+
+static void dispose_class (audio_driver_class_t *this_gen) {
+
+ esd_class_t *this = (esd_class_t *) this_gen;
+
+ free (this);
+}
+
+static void *init_class (xine_t *xine, void *data) {
+
+ esd_class_t *this;
+
+ this = (esd_class_t *) malloc (sizeof (esd_class_t));
+
+ this->driver_class.open_plugin = open_plugin;
+ this->driver_class.get_identifier = get_identifier;
+ this->driver_class.get_description = get_description;
+ this->driver_class.dispose = dispose_class;
+
+ this->config = xine->config;
+
+ return this;
+}
+
static ao_info_t ao_info_esd = {
- "xine audio output plugin using esd",
4
};
-ao_info_t *get_audio_out_plugin_info() {
- ao_info_esd.description = _("xine audio output plugin using esd");
- return &ao_info_esd;
-}
-
/*
* exported plugin catalog entry
*/
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_AUDIO_OUT, AO_OUT_ESD_IFACE_VERSION, "esd", XINE_VERSION_CODE, &ao_info_esd, init_audio_out_plugin },
+ { PLUGIN_AUDIO_OUT, AO_OUT_ESD_IFACE_VERSION, "esd", XINE_VERSION_CODE, &ao_info_esd, init_class },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};