diff options
-rw-r--r-- | src/audio_out/audio_oss_out.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c index 3135611d8..bde236e99 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.80 2002/11/12 00:32:29 guenter Exp $ + * $Id: audio_oss_out.c,v 1.81 2002/11/16 11:39:10 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 @@ -507,6 +507,7 @@ static int ao_oss_get_property (xine_ao_driver_t *this_gen, int property) { else printf("%s(): open() %s failed: %s\n", __XINE_FUNCTION__, this->mixer.name, strerror(errno)); + return -1; } return this->mixer.volume; break; @@ -813,6 +814,14 @@ static xine_ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const voi bits = 8; if( ioctl(audio_fd, SNDCTL_DSP_SAMPLESIZE,&bits) != -1 ) this->capabilities |= AO_CAP_8BITS; + + /* switch back to 16bits, because some soundcards otherwise do not report all their capabilities */ + bits = 16; + if (ioctl(audio_fd, SNDCTL_DSP_SAMPLESIZE, &bits) == -1) { + printf("audio_oss_out: switching the soundcard to 16 bits mode failed\n"); + free(this); + return NULL; + } printf ("audio_oss_out : supported modes are "); num_channels = 1; |