diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/audio_out/audio_oss_out.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c index 25cbc22f4..aaad9abc2 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.63 2002/05/02 10:24:10 heikos Exp $ + * $Id: audio_oss_out.c,v 1.64 2002/05/21 20:36:06 miguelfreitas Exp $ * * 20-8-2001 First implementation of Audio sync and Audio driver separation. * Copyright (C) 2001 James Courtier-Dutton James@superbug.demon.co.uk @@ -700,27 +700,19 @@ ao_driver_t *init_audio_out_plugin (config_values_t *config) { if (this->sync_method == OSS_SYNC_AUTO_DETECT) { - ioctl (audio_fd, SNDCTL_DSP_GETCAPS, &caps); - - if ((caps & DSP_CAP_REALTIME) > 0) { + count_info info; - count_info info; + /* + * check if SNDCTL_DSP_GETODELAY works. if so, using it is preferred. + */ - /* - * check if SNDCTL_DSP_GETODELAY works. if so, using it is preferred. - */ - - if (ioctl(audio_fd, SNDCTL_DSP_GETODELAY, &info) != -1) { - printf("audio_oss_out: using SNDCTL_DSP_GETODELAY\n"); - this->sync_method = OSS_SYNC_GETODELAY; - } else if (ioctl(audio_fd, SNDCTL_DSP_GETOPTR, &info) != -1) { - printf("audio_oss_out: using SNDCTL_DSP_GETOPTR\n"); - this->sync_method = OSS_SYNC_GETOPTR; - } else - this->sync_method = OSS_SYNC_SOFTSYNC; + if (ioctl(audio_fd, SNDCTL_DSP_GETODELAY, &info) != -1) { + printf("audio_oss_out: using SNDCTL_DSP_GETODELAY\n"); + this->sync_method = OSS_SYNC_GETODELAY; + } else if (ioctl(audio_fd, SNDCTL_DSP_GETOPTR, &info) != -1) { + printf("audio_oss_out: using SNDCTL_DSP_GETOPTR\n"); + this->sync_method = OSS_SYNC_GETOPTR; } else { - printf ("audio_oss_out: realtime check: *FAILED*\n"); - this->sync_method = OSS_SYNC_SOFTSYNC; } } |