summaryrefslogtreecommitdiff
path: root/src/audio_out
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2002-11-20 11:57:38 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2002-11-20 11:57:38 +0000
commit4e95a4f5224e241075b8cd86b4423c85c1d0ee26 (patch)
treecd9287e15591dce94560663ad66fc4005d006012 /src/audio_out
parent74893748b868ecc6ae539fa66e326e06947c4ac9 (diff)
downloadxine-lib-4e95a4f5224e241075b8cd86b4423c85c1d0ee26.tar.gz
xine-lib-4e95a4f5224e241075b8cd86b4423c85c1d0ee26.tar.bz2
engine modifications to allow post plugin layer:
* new public output interface xine_{audio,video}_port_t instead of xine_{ao,vo}_driver_t, old names kept as aliases for compatibility * modified the engine to allow multiple streams per output * renaming of some internal structures according to public changes * moving SCR out of per-stream-metronom into a global metronom_clock_t residing in xine_t and therefore easily available to the output layer * adapting all available plugins (note to external projects: the compiler will help you a lot, if a plugin compiles, it is adapted, because all changes add new parameters to some functions) * bump up all interface versions because of xine_t and xine_stream_t changes CVS patchset: 3312 CVS date: 2002/11/20 11:57:38
Diffstat (limited to 'src/audio_out')
-rw-r--r--src/audio_out/audio_alsa_out.c34
-rw-r--r--src/audio_out/audio_arts_out.c28
-rw-r--r--src/audio_out/audio_esd_out.c28
-rw-r--r--src/audio_out/audio_oss_out.c32
-rw-r--r--src/audio_out/audio_sun_out.c32
5 files changed, 77 insertions, 77 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c
index c0f52b6c8..7ed2363fa 100644
--- a/src/audio_out/audio_alsa_out.c
+++ b/src/audio_out/audio_alsa_out.c
@@ -26,7 +26,7 @@
* (c) 2001 James Courtier-Dutton <James@superbug.demon.co.uk>
*
*
- * $Id: audio_alsa_out.c,v 1.83 2002/10/24 13:52:56 jcdutton Exp $
+ * $Id: audio_alsa_out.c,v 1.84 2002/11/20 11:57:38 mroi Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -65,7 +65,7 @@
#define LOG_DEBUG
*/
-#define AO_OUT_ALSA_IFACE_VERSION 5
+#define AO_OUT_ALSA_IFACE_VERSION 6
#define BUFFER_TIME 1000*1000
#define PERIOD_TIME 100*1000
@@ -83,7 +83,7 @@ typedef struct {
typedef struct alsa_driver_s {
- xine_ao_driver_t ao_driver;
+ ao_driver_t ao_driver;
alsa_class_t *class;
@@ -166,7 +166,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(xine_ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int mode)
+static int ao_alsa_open(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->class->xine->config;
@@ -412,7 +412,7 @@ __close:
/*
* Return the number of audio channels
*/
-static int ao_alsa_num_channels(xine_ao_driver_t *this_gen)
+static int ao_alsa_num_channels(ao_driver_t *this_gen)
{
alsa_driver_t *this = (alsa_driver_t *) this_gen;
return this->num_channels;
@@ -421,7 +421,7 @@ static int ao_alsa_num_channels(xine_ao_driver_t *this_gen)
/*
* Return the number of bytes per frame
*/
-static int ao_alsa_bytes_per_frame(xine_ao_driver_t *this_gen)
+static int ao_alsa_bytes_per_frame(ao_driver_t *this_gen)
{
alsa_driver_t *this = (alsa_driver_t *) this_gen;
return this->bytes_per_frame;
@@ -430,7 +430,7 @@ static int ao_alsa_bytes_per_frame(xine_ao_driver_t *this_gen)
/*
* Return gap tolerance (in pts)
*/
-static int ao_alsa_get_gap_tolerance (xine_ao_driver_t *this_gen)
+static int ao_alsa_get_gap_tolerance (ao_driver_t *this_gen)
{
return GAP_TOLERANCE;
}
@@ -441,7 +441,7 @@ static int ao_alsa_get_gap_tolerance (xine_ao_driver_t *this_gen)
/* FIXME: delay returns invalid data if status is not RUNNING.
* e.g When there is an XRUN or we are in PREPARED mode.
*/
-static int ao_alsa_delay (xine_ao_driver_t *this_gen)
+static int ao_alsa_delay (ao_driver_t *this_gen)
{
snd_pcm_state_t state;
snd_pcm_sframes_t delay = 0;
@@ -494,7 +494,7 @@ static void xrun(alsa_driver_t *this)
/*
* Write audio data to output buffer (blocking using snd_pcm_wait)
*/
-static int ao_alsa_write(xine_ao_driver_t *this_gen,int16_t *data, uint32_t count)
+static int ao_alsa_write(ao_driver_t *this_gen,int16_t *data, uint32_t count)
{
snd_pcm_sframes_t result;
snd_pcm_status_t *pcm_stat;
@@ -586,7 +586,7 @@ static int ao_alsa_write(xine_ao_driver_t *this_gen,int16_t *data, uint32_t coun
/*
* This is called when the decoder no longer uses the audio
*/
-static void ao_alsa_close(xine_ao_driver_t *this_gen)
+static void ao_alsa_close(ao_driver_t *this_gen)
{
alsa_driver_t *this = (alsa_driver_t *) this_gen;
if(this->audio_fd) snd_pcm_close(this->audio_fd);
@@ -597,7 +597,7 @@ static void ao_alsa_close(xine_ao_driver_t *this_gen)
/*
* Find out what output modes + capatilities are supported
*/
-static uint32_t ao_alsa_get_capabilities (xine_ao_driver_t *this_gen) {
+static uint32_t ao_alsa_get_capabilities (ao_driver_t *this_gen) {
alsa_driver_t *this = (alsa_driver_t *) this_gen;
return this->capabilities;
}
@@ -605,7 +605,7 @@ static uint32_t ao_alsa_get_capabilities (xine_ao_driver_t *this_gen) {
/*
* Shut down audio output driver plugin and free all resources allocated
*/
-static void ao_alsa_exit(xine_ao_driver_t *this_gen)
+static void ao_alsa_exit(ao_driver_t *this_gen)
{
alsa_driver_t *this = (alsa_driver_t *) this_gen;
void *p;
@@ -632,7 +632,7 @@ static void ao_alsa_exit(xine_ao_driver_t *this_gen)
/*
* Get a property of audio driver
*/
-static int ao_alsa_get_property (xine_ao_driver_t *this_gen, int property) {
+static int ao_alsa_get_property (ao_driver_t *this_gen, int property) {
alsa_driver_t *this = (alsa_driver_t *) this_gen;
int err;
@@ -676,7 +676,7 @@ static int ao_alsa_get_property (xine_ao_driver_t *this_gen, int property) {
/*
* Set a property of audio driver
*/
-static int ao_alsa_set_property (xine_ao_driver_t *this_gen, int property, int value) {
+static int ao_alsa_set_property (ao_driver_t *this_gen, int property, int value) {
alsa_driver_t *this = (alsa_driver_t *) this_gen;
int err;
@@ -747,7 +747,7 @@ static int ao_alsa_set_property (xine_ao_driver_t *this_gen, int property, int v
/*
* Misc control operations
*/
-static int ao_alsa_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
+static int ao_alsa_ctrl(ao_driver_t *this_gen, int cmd, ...) {
alsa_driver_t *this = (alsa_driver_t *) this_gen;
int result;
@@ -805,7 +805,7 @@ static int ao_alsa_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
/*
* Initialize mixer
*/
-static void ao_alsa_mixer_init(xine_ao_driver_t *this_gen) {
+static void ao_alsa_mixer_init(ao_driver_t *this_gen) {
alsa_driver_t *this = (alsa_driver_t *) this_gen;
config_values_t *config = this->class->xine->config;
char *pcm_device;
@@ -994,7 +994,7 @@ static void ao_alsa_mixer_init(xine_ao_driver_t *this_gen) {
/*
* Initialize plugin
*/
-static xine_ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *data) {
+static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *data) {
alsa_class_t *class = (alsa_class_t *) class_gen;
config_values_t *config = class->xine->config;
diff --git a/src/audio_out/audio_arts_out.c b/src/audio_out/audio_arts_out.c
index a808ac1ce..d3a920a23 100644
--- a/src/audio_out/audio_arts_out.c
+++ b/src/audio_out/audio_arts_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_arts_out.c,v 1.15 2002/09/05 20:44:38 mroi Exp $
+ * $Id: audio_arts_out.c,v 1.16 2002/11/20 11:57:39 mroi Exp $
*/
/* required for swab() */
@@ -50,7 +50,7 @@
typedef struct arts_driver_s {
- xine_ao_driver_t ao_driver;
+ 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(xine_ao_driver_t *this_gen,
+static int ao_arts_open(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(xine_ao_driver_t *this_gen,
}
-static int ao_arts_num_channels(xine_ao_driver_t *this_gen)
+static int ao_arts_num_channels(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(xine_ao_driver_t *this_gen)
+static int ao_arts_bytes_per_frame(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 (xine_ao_driver_t *this_gen)
+static int ao_arts_get_gap_tolerance (ao_driver_t *this_gen)
{
return GAP_TOLERANCE;
}
-static int ao_arts_write(xine_ao_driver_t *this_gen, int16_t *data,
+static int ao_arts_write(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(xine_ao_driver_t *this_gen, int16_t *data,
}
-static int ao_arts_delay (xine_ao_driver_t *this_gen)
+static int ao_arts_delay (ao_driver_t *this_gen)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
@@ -197,7 +197,7 @@ static int ao_arts_delay (xine_ao_driver_t *this_gen)
return this->latency * this->sample_rate / 1000;
}
-static void ao_arts_close(xine_ao_driver_t *this_gen)
+static void ao_arts_close(ao_driver_t *this_gen)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
@@ -207,12 +207,12 @@ static void ao_arts_close(xine_ao_driver_t *this_gen)
}
}
-static uint32_t ao_arts_get_capabilities (xine_ao_driver_t *this_gen) {
+static uint32_t ao_arts_get_capabilities (ao_driver_t *this_gen) {
arts_driver_t *this = (arts_driver_t *) this_gen;
return this->capabilities;
}
-static void ao_arts_exit(xine_ao_driver_t *this_gen)
+static void ao_arts_exit(ao_driver_t *this_gen)
{
arts_driver_t *this = (arts_driver_t *) this_gen;
@@ -225,7 +225,7 @@ static void ao_arts_exit(xine_ao_driver_t *this_gen)
/*
*
*/
-static int ao_arts_get_property (xine_ao_driver_t *this_gen, int property) {
+static int ao_arts_get_property (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 (xine_ao_driver_t *this_gen, int property) {
/*
*
*/
-static int ao_arts_set_property (xine_ao_driver_t *this_gen, int property, int value) {
+static int ao_arts_set_property (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 (xine_ao_driver_t *this_gen, int property, int v
/*
*
*/
-static int ao_arts_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
+static int ao_arts_ctrl(ao_driver_t *this_gen, int cmd, ...) {
/*arts_driver_t *this = (arts_driver_t *) this_gen;*/
switch (cmd) {
diff --git a/src/audio_out/audio_esd_out.c b/src/audio_out/audio_esd_out.c
index 5d7e32194..2eb93a1f5 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.21 2002/09/05 20:44:38 mroi Exp $
+ * $Id: audio_esd_out.c,v 1.22 2002/11/20 11:57:39 mroi Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -45,7 +45,7 @@
typedef struct esd_driver_s {
- xine_ao_driver_t ao_driver;
+ 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(xine_ao_driver_t *this_gen,
+static int ao_esd_open(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(xine_ao_driver_t *this_gen,
return this->output_sample_rate;
}
-static int ao_esd_num_channels(xine_ao_driver_t *this_gen)
+static int ao_esd_num_channels(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(xine_ao_driver_t *this_gen)
+static int ao_esd_bytes_per_frame(ao_driver_t *this_gen)
{
esd_driver_t *this = (esd_driver_t *) this_gen;
return this->bytes_per_frame;
}
-static int ao_esd_delay(xine_ao_driver_t *this_gen)
+static int ao_esd_delay(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(xine_ao_driver_t *this_gen)
return bytes_left / this->bytes_per_frame;
}
-static int ao_esd_write(xine_ao_driver_t *this_gen,
+static int ao_esd_write(ao_driver_t *this_gen,
int16_t* frame_buffer, uint32_t num_frames)
{
@@ -214,24 +214,24 @@ static int ao_esd_write(xine_ao_driver_t *this_gen,
return 1;
}
-static void ao_esd_close(xine_ao_driver_t *this_gen)
+static void ao_esd_close(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 (xine_ao_driver_t *this_gen) {
+static uint32_t ao_esd_get_capabilities (ao_driver_t *this_gen) {
esd_driver_t *this = (esd_driver_t *) this_gen;
return this->capabilities;
}
-static int ao_esd_get_gap_tolerance (xine_ao_driver_t *this_gen) {
+static int ao_esd_get_gap_tolerance (ao_driver_t *this_gen) {
/* esd_driver_t *this = (esd_driver_t *) this_gen; */
return GAP_TOLERANCE;
}
-static void ao_esd_exit(xine_ao_driver_t *this_gen)
+static void ao_esd_exit(ao_driver_t *this_gen)
{
esd_driver_t *this = (esd_driver_t *) this_gen;
@@ -243,7 +243,7 @@ static void ao_esd_exit(xine_ao_driver_t *this_gen)
free (this);
}
-static int ao_esd_get_property (xine_ao_driver_t *this_gen, int property) {
+static int ao_esd_get_property (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 (xine_ao_driver_t *this_gen, int property) {
return 0;
}
-static int ao_esd_set_property (xine_ao_driver_t *this_gen, int property, int value) {
+static int ao_esd_set_property (ao_driver_t *this_gen, int property, int value) {
esd_driver_t *this = (esd_driver_t *) this_gen;
int mixer_fd;
@@ -343,7 +343,7 @@ static int ao_esd_set_property (xine_ao_driver_t *this_gen, int property, int va
return ~value;
}
-static int ao_esd_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
+static int ao_esd_ctrl(ao_driver_t *this_gen, int cmd, ...) {
/* esd_driver_t *this = (esd_driver_t *) this_gen; */
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c
index bde236e99..fec8cacec 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.81 2002/11/16 11:39:10 mroi Exp $
+ * $Id: audio_oss_out.c,v 1.82 2002/11/20 11:57:40 mroi Exp $
*
* 20-8-2001 First implementation of Audio sync and Audio driver separation.
* Copyright (C) 2001 James Courtier-Dutton James@superbug.demon.co.uk
@@ -87,7 +87,7 @@
# define AFMT_AC3 0x00000400
#endif
-#define AO_OUT_OSS_IFACE_VERSION 5
+#define AO_OUT_OSS_IFACE_VERSION 6
#define AUDIO_NUM_FRAGMENTS 15
#define AUDIO_FRAGMENT_SIZE 8192
@@ -112,7 +112,7 @@
typedef struct oss_driver_s {
- xine_ao_driver_t ao_driver;
+ ao_driver_t ao_driver;
char audio_dev[20];
int audio_fd;
int capabilities;
@@ -152,7 +152,7 @@ typedef struct {
/*
* open the audio device for writing to
*/
-static int ao_oss_open(xine_ao_driver_t *this_gen,
+static int ao_oss_open(ao_driver_t *this_gen,
uint32_t bits, uint32_t rate, int mode) {
oss_driver_t *this = (oss_driver_t *) this_gen;
@@ -333,27 +333,27 @@ static int ao_oss_open(xine_ao_driver_t *this_gen,
return this->output_sample_rate;
}
-static int ao_oss_num_channels(xine_ao_driver_t *this_gen) {
+static int ao_oss_num_channels(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(xine_ao_driver_t *this_gen) {
+static int ao_oss_bytes_per_frame(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 (xine_ao_driver_t *this_gen){
+static int ao_oss_get_gap_tolerance (ao_driver_t *this_gen){
/* oss_driver_t *this = (oss_driver_t *) this_gen; */
return GAP_TOLERANCE;
}
-static int ao_oss_delay(xine_ao_driver_t *this_gen) {
+static int ao_oss_delay(ao_driver_t *this_gen) {
count_info info;
oss_driver_t *this = (oss_driver_t *) this_gen;
@@ -409,7 +409,7 @@ static int ao_oss_delay(xine_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(xine_ao_driver_t *this_gen,
+static int ao_oss_write(ao_driver_t *this_gen,
int16_t* frame_buffer, uint32_t num_frames) {
oss_driver_t *this = (oss_driver_t *) this_gen;
@@ -450,7 +450,7 @@ static int ao_oss_write(xine_ao_driver_t *this_gen,
return n;
}
-static void ao_oss_close(xine_ao_driver_t *this_gen) {
+static void ao_oss_close(ao_driver_t *this_gen) {
oss_driver_t *this = (oss_driver_t *) this_gen;
@@ -458,14 +458,14 @@ static void ao_oss_close(xine_ao_driver_t *this_gen) {
this->audio_fd = -1;
}
-static uint32_t ao_oss_get_capabilities (xine_ao_driver_t *this_gen) {
+static uint32_t ao_oss_get_capabilities (ao_driver_t *this_gen) {
oss_driver_t *this = (oss_driver_t *) this_gen;
return this->capabilities;
}
-static void ao_oss_exit(xine_ao_driver_t *this_gen) {
+static void ao_oss_exit(ao_driver_t *this_gen) {
oss_driver_t *this = (oss_driver_t *) this_gen;
@@ -475,7 +475,7 @@ static void ao_oss_exit(xine_ao_driver_t *this_gen) {
free (this);
}
-static int ao_oss_get_property (xine_ao_driver_t *this_gen, int property) {
+static int ao_oss_get_property (ao_driver_t *this_gen, int property) {
oss_driver_t *this = (oss_driver_t *) this_gen;
int mixer_fd;
@@ -520,7 +520,7 @@ static int ao_oss_get_property (xine_ao_driver_t *this_gen, int property) {
return 0;
}
-static int ao_oss_set_property (xine_ao_driver_t *this_gen, int property, int value) {
+static int ao_oss_set_property (ao_driver_t *this_gen, int property, int value) {
oss_driver_t *this = (oss_driver_t *) this_gen;
int mixer_fd;
@@ -604,7 +604,7 @@ static int ao_oss_set_property (xine_ao_driver_t *this_gen, int property, int va
return ~value;
}
-static int ao_oss_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
+static int ao_oss_ctrl(ao_driver_t *this_gen, int cmd, ...) {
oss_driver_t *this = (oss_driver_t *) this_gen;
switch (cmd) {
@@ -642,7 +642,7 @@ static int ao_oss_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
return 0;
}
-static xine_ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *data) {
+static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *data) {
oss_class_t *class = (oss_class_t *) class_gen;
config_values_t *config = class->config;
diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c
index ed4448af3..24f1644c1 100644
--- a/src/audio_out/audio_sun_out.c
+++ b/src/audio_out/audio_sun_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_sun_out.c,v 1.26 2002/11/02 14:39:51 jkeil Exp $
+ * $Id: audio_sun_out.c,v 1.27 2002/11/20 11:57:40 mroi Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -59,7 +59,7 @@
#define AUDIO_PRECISION_16 16
#endif
-#define AO_SUN_IFACE_VERSION 5
+#define AO_SUN_IFACE_VERSION 6
#define GAP_TOLERANCE 5000
#define GAP_NONRT_TOLERANCE AO_MAX_GAP
@@ -75,7 +75,7 @@ typedef struct {
typedef struct sun_driver_s {
- xine_ao_driver_t ao_driver;
+ ao_driver_t ao_driver;
char *audio_dev;
int audio_fd;
@@ -399,7 +399,7 @@ find_highest_samplerate(int dev)
* other 8-bit formats (uLaw, aLaw, etc) are currently not supported
* by xine
*/
-static int ao_sun_open(xine_ao_driver_t *this_gen,
+static int ao_sun_open(ao_driver_t *this_gen,
uint32_t bits, uint32_t rate, int mode)
{
sun_driver_t *this = (sun_driver_t *) this_gen;
@@ -541,19 +541,19 @@ static int ao_sun_open(xine_ao_driver_t *this_gen,
return this->output_sample_rate;
}
-static int ao_sun_num_channels(xine_ao_driver_t *this_gen)
+static int ao_sun_num_channels(ao_driver_t *this_gen)
{
sun_driver_t *this = (sun_driver_t *) this_gen;
return this->num_channels;
}
-static int ao_sun_bytes_per_frame(xine_ao_driver_t *this_gen)
+static int ao_sun_bytes_per_frame(ao_driver_t *this_gen)
{
sun_driver_t *this = (sun_driver_t *) this_gen;
return this->bytes_per_frame;
}
-static int ao_sun_delay(xine_ao_driver_t *this_gen)
+static int ao_sun_delay(ao_driver_t *this_gen)
{
sun_driver_t *this = (sun_driver_t *) this_gen;
audio_info_t info;
@@ -606,7 +606,7 @@ static int ao_sun_delay(xine_ao_driver_t *this_gen)
return NOT_REAL_TIME;
}
-static int ao_sun_get_gap_tolerance (xine_ao_driver_t *this_gen)
+static int ao_sun_get_gap_tolerance (ao_driver_t *this_gen)
{
sun_driver_t *this = (sun_driver_t *) this_gen;
@@ -688,7 +688,7 @@ static void sun_audio_flush(sun_driver_t *this)
* audio frames are equivalent one sample on each channel.
* I.E. Stereo 16 bits audio frames are 4 bytes.
*/
-static int ao_sun_write(xine_ao_driver_t *this_gen,
+static int ao_sun_write(ao_driver_t *this_gen,
int16_t* data, uint32_t num_frames)
{
uint8_t *frame_buffer=(uint8_t *)data;
@@ -733,7 +733,7 @@ static int ao_sun_write(xine_ao_driver_t *this_gen,
return num_written;
}
-static void ao_sun_close(xine_ao_driver_t *this_gen)
+static void ao_sun_close(ao_driver_t *this_gen)
{
sun_driver_t *this = (sun_driver_t *) this_gen;
sun_audio_flush(this);
@@ -741,12 +741,12 @@ static void ao_sun_close(xine_ao_driver_t *this_gen)
this->audio_fd = -1;
}
-static uint32_t ao_sun_get_capabilities (xine_ao_driver_t *this_gen) {
+static uint32_t ao_sun_get_capabilities (ao_driver_t *this_gen) {
sun_driver_t *this = (sun_driver_t *) this_gen;
return this->capabilities;
}
-static void ao_sun_exit(xine_ao_driver_t *this_gen)
+static void ao_sun_exit(ao_driver_t *this_gen)
{
sun_driver_t *this = (sun_driver_t *) this_gen;
@@ -760,7 +760,7 @@ static void ao_sun_exit(xine_ao_driver_t *this_gen)
* Get a property of audio driver.
* return 1 in success, 0 on failure. (and the property value?)
*/
-static int ao_sun_get_property (xine_ao_driver_t *this_gen, int property) {
+static int ao_sun_get_property (ao_driver_t *this_gen, int property) {
sun_driver_t *this = (sun_driver_t *) this_gen;
audio_info_t info;
@@ -785,7 +785,7 @@ static int ao_sun_get_property (xine_ao_driver_t *this_gen, int property) {
* Set a property of audio driver.
* return value on success, ~value on failure
*/
-static int ao_sun_set_property (xine_ao_driver_t *this_gen, int property, int value) {
+static int ao_sun_set_property (ao_driver_t *this_gen, int property, int value) {
sun_driver_t *this = (sun_driver_t *) this_gen;
audio_info_t info;
@@ -810,7 +810,7 @@ static int ao_sun_set_property (xine_ao_driver_t *this_gen, int property, int va
return ~value;
}
-static int ao_sun_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
+static int ao_sun_ctrl(ao_driver_t *this_gen, int cmd, ...) {
sun_driver_t *this = (sun_driver_t *) this_gen;
audio_info_t info;
@@ -859,7 +859,7 @@ static int ao_sun_ctrl(xine_ao_driver_t *this_gen, int cmd, ...) {
return 0;
}
-static xine_ao_driver_t *ao_sun_open_plugin (audio_driver_class_t *class_gen, const void *data) {
+static ao_driver_t *ao_sun_open_plugin (audio_driver_class_t *class_gen, const void *data) {
sun_class_t *class = (sun_class_t *) class_gen;
config_values_t *config = class->config;