summaryrefslogtreecommitdiff
path: root/src/audio_out
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio_out')
-rw-r--r--src/audio_out/audio_alsa_out.c176
-rw-r--r--src/audio_out/audio_arts_out.c53
-rw-r--r--src/audio_out/audio_esd_out.c62
-rw-r--r--src/audio_out/audio_irixal_out.c30
-rw-r--r--src/audio_out/audio_oss_out.c66
-rw-r--r--src/audio_out/audio_sun_out.c28
6 files changed, 237 insertions, 178 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c
index fd276ba9d..5db74b169 100644
--- a/src/audio_out/audio_alsa_out.c
+++ b/src/audio_out/audio_alsa_out.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2000, 2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
* (c) 2001 James Courtier-Dutton <James@superbug.demon.co.uk>
*
*
- * $Id: audio_alsa_out.c,v 1.75 2002/07/31 06:29:08 pmhahn Exp $
+ * $Id: audio_alsa_out.c,v 1.76 2002/09/04 23:31:07 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -72,7 +72,7 @@
typedef struct alsa_driver_s {
- ao_driver_t ao_driver;
+ xine_ao_driver_t ao_driver;
config_values_t *config;
@@ -154,7 +154,7 @@ static long ao_alsa_get_volume_from_percent(int val, long min, long max)
/*
* open the audio device for writing to
*/
-static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int mode)
+static int ao_alsa_open(xine_ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int mode)
{
alsa_driver_t *this = (alsa_driver_t *) this_gen;
config_values_t *config = this->config;
@@ -180,7 +180,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
"default",
_("device used for mono output"),
NULL,
- NULL,
+ 10, NULL,
NULL);
break;
case AO_CAP_MODE_STEREO:
@@ -190,7 +190,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
"default",
_("device used for stereo output"),
NULL,
- NULL,
+ 10, NULL,
NULL);
break;
case AO_CAP_MODE_4CHANNEL:
@@ -200,7 +200,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
"surround40",
_("device used for 4-channel output"),
NULL,
- NULL,
+ 10, NULL,
NULL);
break;
case AO_CAP_MODE_5CHANNEL:
@@ -210,7 +210,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
"surround51",
_("device used for 5-channel output"),
NULL,
- NULL,
+ 10, NULL,
NULL);
break;
case AO_CAP_MODE_5_1CHANNEL:
@@ -220,7 +220,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
"surround51",
_("device used for 5.1-channel output"),
NULL,
- NULL,
+ 10, NULL,
NULL);
break;
case AO_CAP_MODE_A52:
@@ -231,7 +231,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
"iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2",
_("device used for 5.1-channel output"),
NULL,
- NULL,
+ 10, NULL,
NULL);
break;
default:
@@ -388,7 +388,7 @@ __close:
/*
* Return the number of audio channels
*/
-static int ao_alsa_num_channels(ao_driver_t *this_gen)
+static int ao_alsa_num_channels(xine_ao_driver_t *this_gen)
{
alsa_driver_t *this = (alsa_driver_t *) this_gen;
return this->num_channels;
@@ -397,7 +397,7 @@ static int ao_alsa_num_channels(ao_driver_t *this_gen)
/*
* Return the number of bytes per frame
*/
-static int ao_alsa_bytes_per_frame(ao_driver_t *this_gen)
+static int ao_alsa_bytes_per_frame(xine_ao_driver_t *this_gen)
{
alsa_driver_t *this = (alsa_driver_t *) this_gen;
return this->bytes_per_frame;
@@ -406,7 +406,7 @@ static int ao_alsa_bytes_per_frame(ao_driver_t *this_gen)
/*
* Return gap tolerance (in pts)
*/
-static int ao_alsa_get_gap_tolerance (ao_driver_t *this_gen)
+static int ao_alsa_get_gap_tolerance (xine_ao_driver_t *this_gen)
{
return GAP_TOLERANCE;
}
@@ -414,7 +414,7 @@ static int ao_alsa_get_gap_tolerance (ao_driver_t *this_gen)
/*
* Return the delay. is frames measured by looking at pending samples
*/
-static int ao_alsa_delay (ao_driver_t *this_gen)
+static int ao_alsa_delay (xine_ao_driver_t *this_gen)
{
snd_pcm_status_t *pcm_stat;
snd_pcm_sframes_t delay;
@@ -459,7 +459,7 @@ static void xrun(alsa_driver_t *this)
/*
* Write audio data to output buffer (blocking)
*/
-static int ao_alsa_write(ao_driver_t *this_gen,int16_t *data, uint32_t count)
+static int ao_alsa_write(xine_ao_driver_t *this_gen,int16_t *data, uint32_t count)
{
snd_pcm_sframes_t result;
uint8_t *buffer=(uint8_t *)data;
@@ -486,7 +486,7 @@ static int ao_alsa_write(ao_driver_t *this_gen,int16_t *data, uint32_t count)
/*
* This is called when the decoder no longer uses the audio
*/
-static void ao_alsa_close(ao_driver_t *this_gen)
+static void ao_alsa_close(xine_ao_driver_t *this_gen)
{
alsa_driver_t *this = (alsa_driver_t *) this_gen;
if(this->audio_fd) snd_pcm_close(this->audio_fd);
@@ -497,7 +497,7 @@ static void ao_alsa_close(ao_driver_t *this_gen)
/*
* Find out what output modes + capatilities are supported
*/
-static uint32_t ao_alsa_get_capabilities (ao_driver_t *this_gen) {
+static uint32_t ao_alsa_get_capabilities (xine_ao_driver_t *this_gen) {
alsa_driver_t *this = (alsa_driver_t *) this_gen;
return this->capabilities;
}
@@ -505,7 +505,7 @@ static uint32_t ao_alsa_get_capabilities (ao_driver_t *this_gen) {
/*
* Shut down audio output driver plugin and free all resources allocated
*/
-static void ao_alsa_exit(ao_driver_t *this_gen)
+static void ao_alsa_exit(xine_ao_driver_t *this_gen)
{
alsa_driver_t *this = (alsa_driver_t *) this_gen;
void *p;
@@ -532,7 +532,7 @@ static void ao_alsa_exit(ao_driver_t *this_gen)
/*
* Get a property of audio driver
*/
-static int ao_alsa_get_property (ao_driver_t *this_gen, int property) {
+static int ao_alsa_get_property (xine_ao_driver_t *this_gen, int property) {
alsa_driver_t *this = (alsa_driver_t *) this_gen;
int err;
@@ -576,7 +576,7 @@ static int ao_alsa_get_property (ao_driver_t *this_gen, int property) {
/*
* Set a property of audio driver
*/
-static int ao_alsa_set_property (ao_driver_t *this_gen, int property, int value) {
+static int ao_alsa_set_property (xine_ao_driver_t *this_gen, int property, int value) {
alsa_driver_t *this = (alsa_driver_t *) this_gen;
int err;
@@ -647,7 +647,7 @@ static int ao_alsa_set_property (ao_driver_t *this_gen, int property, int value)
/*
* Misc control operations
*/
-static int ao_alsa_ctrl(ao_driver_t *this_gen, int cmd, ...) {
+static int ao_alsa_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
alsa_driver_t *this = (alsa_driver_t *) this_gen;
int result;
@@ -712,7 +712,7 @@ static int ao_alsa_ctrl(ao_driver_t *this_gen, int cmd, ...) {
/*
* Initialize mixer
*/
-static void ao_alsa_mixer_init(ao_driver_t *this_gen) {
+static void ao_alsa_mixer_init(xine_ao_driver_t *this_gen) {
alsa_driver_t *this = (alsa_driver_t *) this_gen;
config_values_t *config = this->config;
char *pcm_device;
@@ -733,7 +733,7 @@ static void ao_alsa_mixer_init(ao_driver_t *this_gen) {
"default",
_("device used for mono output"),
NULL,
- NULL,
+ 10, NULL,
NULL);
if ((err = snd_ctl_open (&ctl_handle, pcm_device, 0)) < 0) {
@@ -860,14 +860,12 @@ static void ao_alsa_mixer_init(ao_driver_t *this_gen) {
config->update_string(config, "audio.alsa_mixer_name", "PCM");
}
- config->save(config);
-
this->mixer.name = config->register_string(config,
"audio.alsa_mixer_name",
"PCM",
_("alsa mixer device"),
NULL,
- NULL,
+ 10, NULL,
NULL);
goto __again;
@@ -903,67 +901,68 @@ static void ao_alsa_mixer_init(ao_driver_t *this_gen) {
/*
* Initialize plugin
*/
-ao_driver_t *init_audio_out_plugin (config_values_t *config) {
+void *init_audio_out_plugin (xine_t *xine, void *data) {
- alsa_driver_t *this;
- int err;
- char *pcm_device;
+ config_values_t *config = xine->config;
+ alsa_driver_t *this;
+ int err;
+ char *pcm_device;
snd_pcm_hw_params_t *params;
this = (alsa_driver_t *) malloc (sizeof (alsa_driver_t));
snd_pcm_hw_params_alloca(&params);
/* Fill the .xinerc file with options */
pcm_device = config->register_string(config,
- "audio.alsa_default_device",
- "default",
- _("device used for mono output"),
- NULL,
- NULL,
- NULL);
+ "audio.alsa_default_device",
+ "default",
+ _("device used for mono output"),
+ NULL,
+ 10, NULL,
+ NULL);
pcm_device = config->register_string(config,
- "audio.alsa_front_device",
- "default",
- _("device used for stereo output"),
- NULL,
- NULL,
- NULL);
+ "audio.alsa_front_device",
+ "default",
+ _("device used for stereo output"),
+ NULL,
+ 10, NULL,
+ NULL);
pcm_device = config->register_string(config,
- "audio.alsa_surround40_device",
- "surround40",
- _("device used for 4-channel output"),
- NULL,
- NULL,
- NULL);
+ "audio.alsa_surround40_device",
+ "surround40",
+ _("device used for 4-channel output"),
+ NULL,
+ 10, NULL,
+ NULL);
pcm_device = config->register_string(config,
- "audio.alsa_surround50_device",
- "surround51",
- _("device used for 5-channel output"),
- NULL,
- NULL,
- NULL);
+ "audio.alsa_surround50_device",
+ "surround51",
+ _("device used for 5-channel output"),
+ NULL,
+ 10, NULL,
+ NULL);
pcm_device = config->register_string(config,
- "audio.alsa_surround51_device",
- "surround51",
- _("device used for 5.1-channel output"),
- NULL,
- NULL,
- NULL);
+ "audio.alsa_surround51_device",
+ "surround51",
+ _("device used for 5.1-channel output"),
+ NULL,
+ 10, NULL,
+ NULL);
pcm_device = config->register_string(config,
- "audio.alsa_a52_device",
- "iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2",
- _("device used for 5.1-channel output"),
- NULL,
- NULL,
- NULL);
+ "audio.alsa_a52_device",
+ "iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2",
+ _("device used for 5.1-channel output"),
+ NULL,
+ 10, NULL,
+ NULL);
/* Use the default device to open first */
pcm_device = config->register_string(config,
- "audio.alsa_default_device",
- "default",
- _("device used for mono output"),
- NULL,
- NULL,
- NULL);
+ "audio.alsa_default_device",
+ "default",
+ _("device used for mono output"),
+ NULL,
+ 10, NULL,
+ NULL);
/*
* find best device driver/channel
@@ -1014,7 +1013,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
0,
_("used to inform xine about what the sound card can do"),
NULL,
- NULL,
+ 0, NULL,
NULL) ) {
this->capabilities |= AO_CAP_MODE_4CHANNEL;
printf ("4-channel ");
@@ -1027,7 +1026,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
0,
_("used to inform xine about what the sound card can do"),
NULL,
- NULL,
+ 0, NULL,
NULL) ) {
this->capabilities |= AO_CAP_MODE_5CHANNEL;
printf ("5-channel ");
@@ -1040,7 +1039,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
0,
_("used to inform xine about what the sound card can do"),
NULL,
- NULL,
+ 0, NULL,
NULL) ) {
this->capabilities |= AO_CAP_MODE_5_1CHANNEL;
printf ("5.1-channel ");
@@ -1058,7 +1057,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
0,
_("used to inform xine about what the sound card can do"),
NULL,
- NULL,
+ 0, NULL,
NULL) ) {
this->capabilities |= AO_CAP_MODE_A52;
this->capabilities |= AO_CAP_MODE_AC5;
@@ -1077,7 +1076,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
"PCM",
_("alsa mixer device"),
NULL,
- NULL,
+ 10, NULL,
NULL);
pthread_mutex_init(&this->mixer.mutex, NULL);
@@ -1099,16 +1098,23 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
return &this->ao_driver;
}
-static ao_info_t ao_info_alsa9 = {
- AO_OUT_ALSA_IFACE_VERSION,
- "alsa09",
- NULL,
- 11
+static ao_info_t ao_info_alsa = {
+ "xine audio output plugin using alsa-compliant audio devices/drivers",
+ 10
};
ao_info_t *get_audio_out_plugin_info() {
- ao_info_alsa9.description = _("xine audio output plugin using alsa-compliant audio devices/drivers");
- return &ao_info_alsa9;
+ ao_info_alsa.description = _("xine audio output plugin using alsa-compliant audio devices/drivers");
+ return &ao_info_alsa;
}
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_AUDIO_OUT, AO_OUT_ALSA_IFACE_VERSION, "alsa", XINE_VERSION_CODE, &ao_info_alsa, init_audio_out_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/audio_out/audio_arts_out.c b/src/audio_out/audio_arts_out.c
index 4d0530fbd..f90d01bd5 100644
--- a/src/audio_out/audio_arts_out.c
+++ b/src/audio_out/audio_arts_out.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2000, 2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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_arts_out.c,v 1.13 2002/06/12 12:22:26 f1rmb Exp $
+ * $Id: audio_arts_out.c,v 1.14 2002/09/04 23:31:07 guenter Exp $
*/
/* required for swab() */
@@ -50,7 +50,7 @@
typedef struct arts_driver_s {
- ao_driver_t ao_driver;
+ xine_ao_driver_t ao_driver;
arts_stream_t audio_stream;
int capabilities;
@@ -95,7 +95,7 @@ static void ao_arts_volume(void *buffer, int length, int left, int right)
/*
* open the audio device for writing to
*/
-static int ao_arts_open(ao_driver_t *this_gen,
+static int ao_arts_open(xine_ao_driver_t *this_gen,
uint32_t bits, uint32_t rate, int mode)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
@@ -154,24 +154,24 @@ static int ao_arts_open(ao_driver_t *this_gen,
}
-static int ao_arts_num_channels(ao_driver_t *this_gen)
+static int ao_arts_num_channels(xine_ao_driver_t *this_gen)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
return this->num_channels;
}
-static int ao_arts_bytes_per_frame(ao_driver_t *this_gen)
+static int ao_arts_bytes_per_frame(xine_ao_driver_t *this_gen)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
return this->bytes_per_frame;
}
-static int ao_arts_get_gap_tolerance (ao_driver_t *this_gen)
+static int ao_arts_get_gap_tolerance (xine_ao_driver_t *this_gen)
{
return GAP_TOLERANCE;
}
-static int ao_arts_write(ao_driver_t *this_gen, int16_t *data,
+static int ao_arts_write(xine_ao_driver_t *this_gen, int16_t *data,
uint32_t num_frames)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
@@ -184,7 +184,7 @@ static int ao_arts_write(ao_driver_t *this_gen, int16_t *data,
}
-static int ao_arts_delay (ao_driver_t *this_gen)
+static int ao_arts_delay (xine_ao_driver_t *this_gen)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
@@ -197,7 +197,7 @@ static int ao_arts_delay (ao_driver_t *this_gen)
return this->latency * this->sample_rate / 1000;
}
-static void ao_arts_close(ao_driver_t *this_gen)
+static void ao_arts_close(xine_ao_driver_t *this_gen)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
@@ -207,12 +207,12 @@ static void ao_arts_close(ao_driver_t *this_gen)
}
}
-static uint32_t ao_arts_get_capabilities (ao_driver_t *this_gen) {
+static uint32_t ao_arts_get_capabilities (xine_ao_driver_t *this_gen) {
arts_driver_t *this = (arts_driver_t *) this_gen;
return this->capabilities;
}
-static void ao_arts_exit(ao_driver_t *this_gen)
+static void ao_arts_exit(xine_ao_driver_t *this_gen)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
@@ -225,7 +225,7 @@ static void ao_arts_exit(ao_driver_t *this_gen)
/*
*
*/
-static int ao_arts_get_property (ao_driver_t *this_gen, int property) {
+static int ao_arts_get_property (xine_ao_driver_t *this_gen, int property) {
arts_driver_t *this = (arts_driver_t *) this_gen;
@@ -246,7 +246,7 @@ static int ao_arts_get_property (ao_driver_t *this_gen, int property) {
/*
*
*/
-static int ao_arts_set_property (ao_driver_t *this_gen, int property, int value) {
+static int ao_arts_set_property (xine_ao_driver_t *this_gen, int property, int value) {
arts_driver_t *this = (arts_driver_t *) this_gen;
int mute = (value) ? 1 : 0;
@@ -279,7 +279,7 @@ static int ao_arts_set_property (ao_driver_t *this_gen, int property, int value)
/*
*
*/
-static int ao_arts_ctrl(ao_driver_t *this_gen, int cmd, ...) {
+static int ao_arts_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
/*arts_driver_t *this = (arts_driver_t *) this_gen;*/
switch (cmd) {
@@ -298,9 +298,10 @@ static int ao_arts_ctrl(ao_driver_t *this_gen, int cmd, ...) {
}
-ao_driver_t *init_audio_out_plugin (config_values_t *config) {
+void *init_audio_out_plugin (xine_t *xine, void *data) {
- arts_driver_t *this;
+ /* config_values_t *config = xine->config; */
+ arts_driver_t *this;
int rc;
this = (arts_driver_t *) malloc (sizeof (arts_driver_t));
@@ -345,13 +346,11 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
this->ao_driver.get_gap_tolerance = ao_arts_get_gap_tolerance;
this->ao_driver.control = ao_arts_ctrl;
- return &this->ao_driver;
+ return this;
}
static ao_info_t ao_info_arts = {
- AO_OUT_ARTS_IFACE_VERSION,
- "arts",
- NULL,
+ "xine audio output plugin using arts-compliant audio devices/drivers",
5
};
@@ -360,3 +359,13 @@ ao_info_t *get_audio_out_plugin_info() {
return &ao_info_arts;
}
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_AUDIO_OUT, AO_OUT_ARTS_IFACE_VERSION, "arts", XINE_VERSION_CODE, &ao_info_arts, init_audio_out_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
+
diff --git a/src/audio_out/audio_esd_out.c b/src/audio_out/audio_esd_out.c
index 3ac872a69..ab489f471 100644
--- a/src/audio_out/audio_esd_out.c
+++ b/src/audio_out/audio_esd_out.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2000, 2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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.19 2002/06/12 12:22:26 f1rmb Exp $
+ * $Id: audio_esd_out.c,v 1.20 2002/09/04 23:31:07 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -45,7 +45,7 @@
typedef struct esd_driver_s {
- ao_driver_t ao_driver;
+ xine_ao_driver_t ao_driver;
int audio_fd;
int capabilities;
@@ -76,7 +76,7 @@ typedef struct esd_driver_s {
/*
* connect to esd
*/
-static int ao_esd_open(ao_driver_t *this_gen,
+static int ao_esd_open(xine_ao_driver_t *this_gen,
uint32_t bits, uint32_t rate, int mode)
{
esd_driver_t *this = (esd_driver_t *) this_gen;
@@ -139,20 +139,20 @@ static int ao_esd_open(ao_driver_t *this_gen,
return this->output_sample_rate;
}
-static int ao_esd_num_channels(ao_driver_t *this_gen)
+static int ao_esd_num_channels(xine_ao_driver_t *this_gen)
{
esd_driver_t *this = (esd_driver_t *) this_gen;
return this->num_channels;
}
-static int ao_esd_bytes_per_frame(ao_driver_t *this_gen)
+static int ao_esd_bytes_per_frame(xine_ao_driver_t *this_gen)
{
esd_driver_t *this = (esd_driver_t *) this_gen;
return this->bytes_per_frame;
}
-static int ao_esd_delay(ao_driver_t *this_gen)
+static int ao_esd_delay(xine_ao_driver_t *this_gen)
{
esd_driver_t *this = (esd_driver_t *) this_gen;
int bytes_left;
@@ -178,7 +178,7 @@ static int ao_esd_delay(ao_driver_t *this_gen)
return bytes_left / this->bytes_per_frame;
}
-static int ao_esd_write(ao_driver_t *this_gen,
+static int ao_esd_write(xine_ao_driver_t *this_gen,
int16_t* frame_buffer, uint32_t num_frames)
{
@@ -214,24 +214,24 @@ static int ao_esd_write(ao_driver_t *this_gen,
return 1;
}
-static void ao_esd_close(ao_driver_t *this_gen)
+static void ao_esd_close(xine_ao_driver_t *this_gen)
{
esd_driver_t *this = (esd_driver_t *) this_gen;
esd_close(this->audio_fd);
this->audio_fd = -1;
}
-static uint32_t ao_esd_get_capabilities (ao_driver_t *this_gen) {
+static uint32_t ao_esd_get_capabilities (xine_ao_driver_t *this_gen) {
esd_driver_t *this = (esd_driver_t *) this_gen;
return this->capabilities;
}
-static int ao_esd_get_gap_tolerance (ao_driver_t *this_gen) {
+static int ao_esd_get_gap_tolerance (xine_ao_driver_t *this_gen) {
/* esd_driver_t *this = (esd_driver_t *) this_gen; */
return GAP_TOLERANCE;
}
-static void ao_esd_exit(ao_driver_t *this_gen)
+static void ao_esd_exit(xine_ao_driver_t *this_gen)
{
esd_driver_t *this = (esd_driver_t *) this_gen;
@@ -243,7 +243,7 @@ static void ao_esd_exit(ao_driver_t *this_gen)
free (this);
}
-static int ao_esd_get_property (ao_driver_t *this_gen, int property) {
+static int ao_esd_get_property (xine_ao_driver_t *this_gen, int property) {
esd_driver_t *this = (esd_driver_t *) this_gen;
int mixer_fd;
esd_player_info_t *esd_pi;
@@ -281,7 +281,7 @@ static int ao_esd_get_property (ao_driver_t *this_gen, int property) {
return 0;
}
-static int ao_esd_set_property (ao_driver_t *this_gen, int property, int value) {
+static int ao_esd_set_property (xine_ao_driver_t *this_gen, int property, int value) {
esd_driver_t *this = (esd_driver_t *) this_gen;
int mixer_fd;
@@ -343,8 +343,8 @@ static int ao_esd_set_property (ao_driver_t *this_gen, int property, int value)
return ~value;
}
-static int ao_esd_ctrl(ao_driver_t *this_gen, int cmd, ...) {
- esd_driver_t *this = (esd_driver_t *) this_gen;
+static int ao_esd_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
+ /* esd_driver_t *this = (esd_driver_t *) this_gen; */
switch (cmd) {
@@ -362,11 +362,12 @@ static int ao_esd_ctrl(ao_driver_t *this_gen, int cmd, ...) {
return 0;
}
-ao_driver_t *init_audio_out_plugin (config_values_t *config) {
+void *init_audio_out_plugin (xine_t *xine, void *data) {
- esd_driver_t *this;
- int audio_fd;
- sigset_t vo_mask, vo_mask_orig;
+ config_values_t *config = xine->config;
+ esd_driver_t *this;
+ int audio_fd;
+ sigset_t vo_mask, vo_mask_orig;
/*
* open stream to ESD server
@@ -412,7 +413,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
this->latency = config->register_range (config, "audio.esd_latency", 30000,
-30000, 90000,
_("esd audio output latency (adjust a/v sync)"),
- NULL, NULL, NULL);
+ NULL, 0, NULL, NULL);
this->ao_driver.get_capabilities = ao_esd_get_capabilities;
this->ao_driver.get_property = ao_esd_get_property;
@@ -427,14 +428,12 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
this->ao_driver.exit = ao_esd_exit;
this->ao_driver.control = ao_esd_ctrl;
- return &this->ao_driver;
+ return this;
}
static ao_info_t ao_info_esd = {
- AO_OUT_ESD_IFACE_VERSION,
- "esd",
- NULL,
- 5
+ "xine audio output plugin using esd",
+ 4
};
ao_info_t *get_audio_out_plugin_info() {
@@ -442,3 +441,12 @@ ao_info_t *get_audio_out_plugin_info() {
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_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/audio_out/audio_irixal_out.c b/src/audio_out/audio_irixal_out.c
index a116033d2..5b8191c16 100644
--- a/src/audio_out/audio_irixal_out.c
+++ b/src/audio_out/audio_irixal_out.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2000, 2001 the xine project
+ * Copyright (C) 2000-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,13 +17,16 @@
* 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_irixal_out.c,v 1.7 2002/06/12 12:22:27 f1rmb Exp $
+ * $Id: audio_irixal_out.c,v 1.8 2002/09/04 23:31:07 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#warning DISABLED: FIXME
+#if 0
+
#include <stdio.h>
#include <errno.h>
#include <string.h>
@@ -395,14 +398,11 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config)
this->ao_driver.get_gap_tolerance = ao_irixal_get_gap_tolerance;
this->ao_driver.control = ao_irixal_ctrl;
- return &this->ao_driver;
+ return this;
}
-static ao_info_t ao_info_irixal =
-{
- AO_IRIXAL_IFACE_VERSION,
- "irixal",
- NULL,
+static ao_info_t ao_info_irixal = {
+ "xine audio output plugin using IRIX libaudio",
10
};
@@ -412,3 +412,15 @@ ao_info_t *get_audio_out_plugin_info()
return &ao_info_irixal;
}
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_AUDIO_OUT, AO_OUT_IRIXAL_IFACE_VERSION, "irixal", XINE_VERSION_CODE, &ao_info_irixal, init_audio_out_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
+
+
+#endif
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c
index 429e084ae..d03ce62ad 100644
--- a/src/audio_out/audio_oss_out.c
+++ b/src/audio_out/audio_oss_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_oss_out.c,v 1.71 2002/07/05 20:54:37 miguelfreitas Exp $
+ * $Id: audio_oss_out.c,v 1.72 2002/09/04 23:31:07 guenter Exp $
*
* 20-8-2001 First implementation of Audio sync and Audio driver separation.
* Copyright (C) 2001 James Courtier-Dutton James@superbug.demon.co.uk
@@ -108,7 +108,7 @@
typedef struct oss_driver_s {
- ao_driver_t ao_driver;
+ xine_ao_driver_t ao_driver;
char audio_dev[20];
int audio_fd;
int capabilities;
@@ -141,7 +141,7 @@ typedef struct oss_driver_s {
/*
* open the audio device for writing to
*/
-static int ao_oss_open(ao_driver_t *this_gen,
+static int ao_oss_open(xine_ao_driver_t *this_gen,
uint32_t bits, uint32_t rate, int mode) {
oss_driver_t *this = (oss_driver_t *) this_gen;
@@ -322,27 +322,27 @@ static int ao_oss_open(ao_driver_t *this_gen,
return this->output_sample_rate;
}
-static int ao_oss_num_channels(ao_driver_t *this_gen) {
+static int ao_oss_num_channels(xine_ao_driver_t *this_gen) {
oss_driver_t *this = (oss_driver_t *) this_gen;
return this->num_channels;
}
-static int ao_oss_bytes_per_frame(ao_driver_t *this_gen) {
+static int ao_oss_bytes_per_frame(xine_ao_driver_t *this_gen) {
oss_driver_t *this = (oss_driver_t *) this_gen;
return this->bytes_per_frame;
}
-static int ao_oss_get_gap_tolerance (ao_driver_t *this_gen){
+static int ao_oss_get_gap_tolerance (xine_ao_driver_t *this_gen){
/* oss_driver_t *this = (oss_driver_t *) this_gen; */
return GAP_TOLERANCE;
}
-static int ao_oss_delay(ao_driver_t *this_gen) {
+static int ao_oss_delay(xine_ao_driver_t *this_gen) {
count_info info;
oss_driver_t *this = (oss_driver_t *) this_gen;
@@ -398,7 +398,7 @@ static int ao_oss_delay(ao_driver_t *this_gen) {
* audio frames are equivalent one sample on each channel.
* I.E. Stereo 16 bits audio frames are 4 bytes.
*/
-static int ao_oss_write(ao_driver_t *this_gen,
+static int ao_oss_write(xine_ao_driver_t *this_gen,
int16_t* frame_buffer, uint32_t num_frames) {
oss_driver_t *this = (oss_driver_t *) this_gen;
@@ -429,7 +429,7 @@ static int ao_oss_write(ao_driver_t *this_gen,
return write(this->audio_fd, frame_buffer, num_frames * this->bytes_per_frame);
}
-static void ao_oss_close(ao_driver_t *this_gen) {
+static void ao_oss_close(xine_ao_driver_t *this_gen) {
oss_driver_t *this = (oss_driver_t *) this_gen;
@@ -437,14 +437,14 @@ static void ao_oss_close(ao_driver_t *this_gen) {
this->audio_fd = -1;
}
-static uint32_t ao_oss_get_capabilities (ao_driver_t *this_gen) {
+static uint32_t ao_oss_get_capabilities (xine_ao_driver_t *this_gen) {
oss_driver_t *this = (oss_driver_t *) this_gen;
return this->capabilities;
}
-static void ao_oss_exit(ao_driver_t *this_gen) {
+static void ao_oss_exit(xine_ao_driver_t *this_gen) {
oss_driver_t *this = (oss_driver_t *) this_gen;
@@ -454,7 +454,7 @@ static void ao_oss_exit(ao_driver_t *this_gen) {
free (this);
}
-static int ao_oss_get_property (ao_driver_t *this_gen, int property) {
+static int ao_oss_get_property (xine_ao_driver_t *this_gen, int property) {
oss_driver_t *this = (oss_driver_t *) this_gen;
int mixer_fd;
@@ -498,7 +498,7 @@ static int ao_oss_get_property (ao_driver_t *this_gen, int property) {
return 0;
}
-static int ao_oss_set_property (ao_driver_t *this_gen, int property, int value) {
+static int ao_oss_set_property (xine_ao_driver_t *this_gen, int property, int value) {
oss_driver_t *this = (oss_driver_t *) this_gen;
int mixer_fd;
@@ -582,7 +582,7 @@ static int ao_oss_set_property (ao_driver_t *this_gen, int property, int value)
return ~value;
}
-static int ao_oss_ctrl(ao_driver_t *this_gen, int cmd, ...) {
+static int ao_oss_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
oss_driver_t *this = (oss_driver_t *) this_gen;
switch (cmd) {
@@ -611,9 +611,10 @@ static int ao_oss_ctrl(ao_driver_t *this_gen, int cmd, ...) {
return 0;
}
-ao_driver_t *init_audio_out_plugin (config_values_t *config) {
+void *init_audio_out_plugin (xine_t *xine, void *data) {
- oss_driver_t *this;
+ config_values_t *config = xine->config;
+ oss_driver_t *this;
int caps;
#ifdef CONFIG_DEVFS_FS
char devname[] = "/dev/sound/dsp\0\0\0";
@@ -638,7 +639,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
best_rate = 0;
devnum = config->register_num (config, "audio.oss_device_num", -1,
_("/dev/dsp# device to use for oss output, -1 => auto_detect"),
- NULL, NULL, NULL);
+ NULL, 10, NULL, NULL);
if (devnum >= 0) {
sprintf (this->audio_dev, DSP_TEMPLATE, devnum);
@@ -706,7 +707,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
this->sync_method = config->register_enum (config, "audio.oss_sync_method", OSS_SYNC_AUTO_DETECT,
sync_methods,
_("A/V sync method to use by OSS, depends on driver/hardware"),
- NULL, NULL, NULL);
+ NULL, 20, NULL, NULL);
if (this->sync_method == OSS_SYNC_AUTO_DETECT) {
@@ -774,7 +775,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
-3000, 3000,
_("Adjust a/v sync for OSS softsync"),
_("Use this to manually adjust a/v sync if you're using softsync"),
- NULL, NULL);
+ 10, NULL, NULL);
this->capabilities = 0;
@@ -800,7 +801,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
if ( (status != -1) && (num_channels==4) ) {
if (config->register_bool (config, "audio.four_channel", 0,
_("Enable 4.0 channel analog surround output"),
- NULL, NULL, NULL)) {
+ NULL, 0, NULL, NULL)) {
this->capabilities |= AO_CAP_MODE_4CHANNEL;
printf ("4-channel ");
} else
@@ -811,7 +812,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
if ( (status != -1) && (num_channels==5) ) {
if (config->register_bool (config, "audio.five_channel", 0,
_("Enable 5.0 channel analog surround output"),
- NULL, NULL, NULL)) {
+ NULL, 0, NULL, NULL)) {
this->capabilities |= AO_CAP_MODE_5CHANNEL;
printf ("5-channel ");
} else
@@ -822,7 +823,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
if ( (status != -1) && (num_channels==6) ) {
if (config->register_bool (config, "audio.five_lfe_channel", 0,
_("Enable 5.1 channel analog surround output"),
- NULL, NULL, NULL)) {
+ NULL, 0, NULL, NULL)) {
this->capabilities |= AO_CAP_MODE_5_1CHANNEL;
printf ("5.1-channel ");
} else
@@ -833,7 +834,7 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
if (caps & AFMT_AC3) {
if (config->register_bool (config, "audio.a52_pass_through", 0,
_("Enable A52 / AC5 digital audio output via spdif"),
- NULL, NULL, NULL)) {
+ NULL, 0, NULL, NULL)) {
this->capabilities |= AO_CAP_MODE_A52;
this->capabilities |= AO_CAP_MODE_AC5;
printf ("a/52-pass-through ");
@@ -848,7 +849,8 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
*/
this->mixer.name = config->register_string(config, "audio.mixer_name", "/dev/mixer",
- _("oss mixer device"), NULL, NULL, NULL);
+ _("oss mixer device"), NULL,
+ 10, NULL, NULL);
{
int mixer_fd;
int audio_devs;
@@ -909,13 +911,11 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
this->ao_driver.get_gap_tolerance = ao_oss_get_gap_tolerance;
this->ao_driver.control = ao_oss_ctrl;
- return &this->ao_driver;
+ return this;
}
static ao_info_t ao_info_oss = {
- AO_OUT_OSS_IFACE_VERSION,
- "oss",
- NULL,
+ "xine audio output plugin using oss-compliant audio devices/drivers",
10
};
@@ -923,3 +923,13 @@ ao_info_t *get_audio_out_plugin_info() {
ao_info_oss.description = _("xine audio output plugin using oss-compliant audio devices/drivers");
return &ao_info_oss;
}
+
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_AUDIO_OUT, AO_OUT_OSS_IFACE_VERSION, "oss", XINE_VERSION_CODE, &ao_info_oss, init_audio_out_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c
index 944b91b60..b5af274c8 100644
--- a/src/audio_out/audio_sun_out.c
+++ b/src/audio_out/audio_sun_out.c
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2001 the xine project
+ * Copyright (C) 2001-2002 the xine project
*
- * This file is part of xine, a unix video player.
+ * This file is part of xine, a free video player.
*
* xine is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -17,13 +17,16 @@
* 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_sun_out.c,v 1.20 2002/06/12 12:22:28 f1rmb Exp $
+ * $Id: audio_sun_out.c,v 1.21 2002/09/04 23:31:07 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#warning DISABLED: FIXME
+#if 0
+
#include <stdio.h>
#include <errno.h>
#include <string.h>
@@ -734,13 +737,11 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) {
this->ao_driver.get_gap_tolerance = ao_sun_get_gap_tolerance;
this->ao_driver.control = ao_sun_ctrl;
- return &this->ao_driver;
+ return this;
}
static ao_info_t ao_info_sun = {
- AO_SUN_IFACE_VERSION,
- "sun",
- NULL,
+ "xine audio output plugin using sun-compliant audio devices/drivers",
10
};
@@ -749,3 +750,16 @@ ao_info_t *get_audio_out_plugin_info() {
return &ao_info_sun;
}
+/*
+ * exported plugin catalog entry
+ */
+
+plugin_info_t xine_plugin_info[] = {
+ /* type, API, "name", version, special_info, init_function */
+ { PLUGIN_AUDIO_OUT, AO_OUT_SUN_IFACE_VERSION, "sun", XINE_VERSION_CODE, &ao_info_sun, init_audio_out_plugin },
+ { PLUGIN_NONE, 0, "", 0, NULL, NULL }
+};
+
+
+#endif
+