From: Miguel F. <mig...@us...> - 2002-05-21 20:36:11
|
Update of /cvsroot/xine/xine-lib/src/audio_out In directory usw-pr-cvs1:/tmp/cvs-serv6083/src/audio_out Modified Files: audio_oss_out.c Log Message: patch from Ian Goldberg <ia...@cy...>: "The logic to detect if your soundcard supports hardware A/V sync was wrong (for my card, cs4232, at least). The code did a check for DSP_CAP_REALTIME, and if that failed, didn't bother to check whether SNDCTL_DSP_GETODELAY or SNDCTL_DSP_GETOPTR worked." Index: audio_oss_out.c =================================================================== RCS file: /cvsroot/xine/xine-lib/src/audio_out/audio_oss_out.c,v retrieving revision 1.63 retrieving revision 1.64 diff -u -r1.63 -r1.64 --- audio_oss_out.c 2 May 2002 10:24:10 -0000 1.63 +++ audio_oss_out.c 21 May 2002 20:36:06 -0000 1.64 @@ -700,27 +700,19 @@ 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; } } |