diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-03-12 01:08:23 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2008-03-12 01:08:23 +0000 |
commit | b5887dafca2631646384b089b6ee45dc51c76405 (patch) | |
tree | 08e074612cbc06a3c5827cebbac5b41d8852b43c /src/audio_out/audio_oss_out.c | |
parent | 1c4e2a1b547e26f48b5797edcf54c43ba6f6e213 (diff) | |
parent | 08765c20628cd7a38b53871390b91b16f30e8f9c (diff) | |
download | xine-lib-b5887dafca2631646384b089b6ee45dc51c76405.tar.gz xine-lib-b5887dafca2631646384b089b6ee45dc51c76405.tar.bz2 |
Merge from 1.1.
--HG--
rename : doc/faq/faq.sgml => doc/faq/faq.docbook
rename : src/xine-engine/xine_internal.h => include/xine/xine_internal.h
rename : src/libffmpeg/Makefile.am => src/combined/ffmpeg/Makefile.am
rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c
Diffstat (limited to 'src/audio_out/audio_oss_out.c')
-rw-r--r-- | src/audio_out/audio_oss_out.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/audio_out/audio_oss_out.c b/src/audio_out/audio_oss_out.c index 7cae9b300..89d79fae9 100644 --- a/src/audio_out/audio_oss_out.c +++ b/src/audio_out/audio_oss_out.c @@ -405,6 +405,18 @@ static int ao_oss_delay(ao_driver_t *this_gen) { if (bytes_left<=0) /* buffer ran dry */ bytes_left = 0; break; + case OSS_SYNC_GETODELAY: +#ifdef SNDCTL_DSP_GETODELAY + if (ioctl (this->audio_fd, SNDCTL_DSP_GETODELAY, &bytes_left)) { + perror ("audio_oss_out: DSP_GETODELAY ioctl():"); + } + if (bytes_left<0) + bytes_left = 0; + + lprintf ("%d bytes left\n", bytes_left); + + break; +#endif case OSS_SYNC_GETOPTR: if (ioctl (this->audio_fd, SNDCTL_DSP_GETOPTR, &info)) { perror ("audio_oss_out: SNDCTL_DSP_GETOPTR failed:"); @@ -424,16 +436,6 @@ static int ao_oss_delay(ao_driver_t *this_gen) { } this->last_getoptr = info.bytes; break; - case OSS_SYNC_GETODELAY: - if (ioctl (this->audio_fd, SNDCTL_DSP_GETODELAY, &bytes_left)) { - perror ("audio_oss_out: DSP_GETODELAY ioctl():"); - } - if (bytes_left<0) - bytes_left = 0; - - lprintf ("%d bytes left\n", bytes_left); - - break; } return bytes_left / this->bytes_per_frame; @@ -840,10 +842,13 @@ static ao_driver_t *open_plugin (audio_driver_class_t *class_gen, const void *da * check if SNDCTL_DSP_GETODELAY works. if so, using it is preferred. */ +#ifdef SNDCTL_DSP_GETODELAY if (ioctl(audio_fd, SNDCTL_DSP_GETODELAY, &info) != -1) { xprintf(class->xine, XINE_VERBOSITY_DEBUG, "audio_oss_out: using SNDCTL_DSP_GETODELAY\n"); this->sync_method = OSS_SYNC_GETODELAY; - } else if (ioctl(audio_fd, SNDCTL_DSP_GETOPTR, &info) != -1) { + } else +#endif + if (ioctl(audio_fd, SNDCTL_DSP_GETOPTR, &info) != -1) { xprintf(class->xine, XINE_VERBOSITY_DEBUG, "audio_oss_out: using SNDCTL_DSP_GETOPTR\n"); this->sync_method = OSS_SYNC_GETOPTR; } else { |