summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGuenter Bartsch <guenter@users.sourceforge.net>2001-08-25 06:48:18 +0000
committerGuenter Bartsch <guenter@users.sourceforge.net>2001-08-25 06:48:18 +0000
commit1129dc86b5e2e39167f20a9db3cc13caedbb5df8 (patch)
treea58a07f77ae1f95002b26ab47cb82b41d2d6a3b4 /src
parentf309f76da792374b07374ca85b7d3103e72efe5d (diff)
downloadxine-lib-1129dc86b5e2e39167f20a9db3cc13caedbb5df8.tar.gz
xine-lib-1129dc86b5e2e39167f20a9db3cc13caedbb5df8.tar.bz2
fixed alsa output open return values
CVS patchset: 481 CVS date: 2001/08/25 06:48:18
Diffstat (limited to 'src')
-rw-r--r--src/audio_out/audio_alsa_out.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c
index 27b698f1c..16af0a34a 100644
--- a/src/audio_out/audio_alsa_out.c
+++ b/src/audio_out/audio_alsa_out.c
@@ -25,7 +25,7 @@
* (c) 2001 James Courtier-Dutton <James@superbug.demon.co.uk>
*
*
- * $Id: audio_alsa_out.c,v 1.17 2001/08/24 01:05:30 guenter Exp $
+ * $Id: audio_alsa_out.c,v 1.18 2001/08/25 06:48:18 guenter Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -130,7 +130,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
err = snd_output_stdio_attach(&jcd_out, stderr, 0);
if (((mode & AO_CAP_MODE_STEREO) == 0) && ((mode & AO_CAP_MODE_AC3) == 0)) {
error ("ALSA Driver only supports AC3/stereo output modes at the moment");
- return -1;
+ return 0;
} else {
this->num_channels = 2;
}
@@ -155,7 +155,7 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
if(err <0 ) {
error("snd_pcm_open() failed: %s", snd_strerror(err));
error(">>> Check if another program don't already use PCM <<<");
- return -1;
+ return 0;
}
if (mode & AO_CAP_MODE_AC3) {
@@ -295,11 +295,11 @@ static int ao_alsa_open(ao_driver_t *this_gen, uint32_t bits, uint32_t rate, int
// write_pause_burst(this,0);
- return 1;
+ return this->output_sample_rate;
__close:
snd_pcm_close (this->audio_fd);
this->audio_fd=NULL;
- return -1;
+ return 0;
}
static int ao_alsa_num_channels(ao_driver_t *this_gen)