summaryrefslogtreecommitdiff
path: root/multimedia/xine-lib/patches/patch-bd
blob: b5d63490dc88094b178580f5cc112cd41ad7c692 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
$NetBSD: patch-bd,v 1.1.16.1 2006/12/09 09:13:15 salo Exp $

--- src/audio_out/audio_oss_out.c.orig	2006-07-16 17:18:09.000000000 +0100
+++ src/audio_out/audio_oss_out.c
@@ -419,6 +419,7 @@ static int ao_oss_delay(ao_driver_t *thi
     }
     this->last_getoptr = info.bytes;
     break;
+#ifndef __NetBSD__
   case OSS_SYNC_GETODELAY:
     if (ioctl (this->audio_fd, SNDCTL_DSP_GETODELAY, &bytes_left)) {
       perror ("audio_oss_out: DSP_GETODELAY ioctl():");
@@ -429,6 +430,7 @@ static int ao_oss_delay(ao_driver_t *thi
     lprintf ("%d bytes left\n", bytes_left);
 
     break;
+#endif
   }
 
   return bytes_left / this->bytes_per_frame;
@@ -835,10 +837,13 @@ static ao_driver_t *open_plugin (audio_d
      * check if SNDCTL_DSP_GETODELAY works. if so, using it is preferred.
      */
 
+#ifndef __NetBSD__
     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) {
+    }
+#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 {