summaryrefslogtreecommitdiff
path: root/audio/amp/patches/patch-ag
diff options
context:
space:
mode:
Diffstat (limited to 'audio/amp/patches/patch-ag')
-rw-r--r--audio/amp/patches/patch-ag18
1 files changed, 18 insertions, 0 deletions
diff --git a/audio/amp/patches/patch-ag b/audio/amp/patches/patch-ag
new file mode 100644
index 00000000000..850dcc6b4dc
--- /dev/null
+++ b/audio/amp/patches/patch-ag
@@ -0,0 +1,18 @@
+$NetBSD: patch-ag,v 1.1 2005/11/18 14:52:44 joerg Exp $
+
+--- audioIO_Linux.c.orig 1997-05-31 19:47:58.000000000 +0200
++++ audioIO_Linux.c
+@@ -78,7 +78,12 @@ audioOpen(int frequency, int stereo, int
+ if (volume != -1)
+ audioSetVolume(volume);
+
+- if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &AUSIZ) == -1)
++#ifdef SNDCTl_DSP_GETBLKSIZE
++ if (ioctl(audio_fd, SNDCTL_DSP_GETBLKSIZE, &AUSIZ) != -1)
++ return;
++#endif
++ AUSIZ = DEFAULT_AUSIZ;
++ if (AUSIZ == 0)
+ die("Unable to get fragment size\n");
+ }
+