summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Gianelloni <wolf31o2@gentoo.org>2006-10-17 14:12:58 +0000
committerChris Gianelloni <wolf31o2@gentoo.org>2006-10-17 14:12:58 +0000
commit61e0ac37a8483ca201502443a8f856275f182636 (patch)
tree57eb276e086ff906ee4cc6cb757dadd7e67fef37 /media-libs/openal
parentAdded ~sparc-fbsd keyword. (diff)
downloadgentoo-2-61e0ac37a8483ca201502443a8f856275f182636.tar.gz
gentoo-2-61e0ac37a8483ca201502443a8f856275f182636.tar.bz2
gentoo-2-61e0ac37a8483ca201502443a8f856275f182636.zip
Added patch from openal-devel list, submitted by Timothy Redaelli <drizzt@gentoo.org>. Closing bug #142509.
(Portage version: 2.1.2_pre3-r3)
Diffstat (limited to 'media-libs/openal')
-rw-r--r--media-libs/openal/ChangeLog7
-rw-r--r--media-libs/openal/files/0.0.8/000_all_freebsd.patch69
2 files changed, 75 insertions, 1 deletions
diff --git a/media-libs/openal/ChangeLog b/media-libs/openal/ChangeLog
index 70478cfeb020..55b14a870307 100644
--- a/media-libs/openal/ChangeLog
+++ b/media-libs/openal/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for media-libs/openal
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/openal/ChangeLog,v 1.70 2006/10/13 16:32:28 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-libs/openal/ChangeLog,v 1.71 2006/10/17 14:12:58 wolf31o2 Exp $
+
+ 17 Oct 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+ +files/0.0.8/000_all_freebsd.patch:
+ Added patch from openal-devel list, submitted by Timothy Redaelli
+ <drizzt@gentoo.org>. Closing bug #142509.
13 Oct 2006; Chris Gianelloni <wolf31o2@gentoo.org>
openal-0.0.8-r1.ebuild:
diff --git a/media-libs/openal/files/0.0.8/000_all_freebsd.patch b/media-libs/openal/files/0.0.8/000_all_freebsd.patch
new file mode 100644
index 000000000000..8de0a05ce023
--- /dev/null
+++ b/media-libs/openal/files/0.0.8/000_all_freebsd.patch
@@ -0,0 +1,69 @@
+--- src/backends/alc_backend_bsd.c.orig Sat Apr 22 12:25:15 2006
++++ src/backends/alc_backend_bsd.c Sat Apr 22 12:26:15 2006
+@@ -9,7 +9,10 @@
+ */
+ #include "al_siteconfig.h"
+
++#define __BSD_VISIBLE 1
++
+ #include <AL/al.h>
++#include <AL/alext.h>
+ #include <assert.h>
+ #include <fcntl.h>
+ #include <sys/soundcard.h>
+@@ -113,7 +114,6 @@
+ */
+ static void *grab_write_native(void) {
+ const char *dsppath = "/dev/dsp";
+- int divisor = _alSpot(_AL_DEF_BUFSIZ) | (2<<16);
+
+ dsp_fd = open(dsppath, O_WRONLY | O_NONBLOCK);
+
+@@ -126,10 +126,6 @@
+ perror("fcntl");
+ }
+
+- if(ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
+- perror("ioctl SETFRAGMENT");
+- }
+-
+ FD_ZERO(&dsp_fd_set);
+ FD_SET(dsp_fd, &dsp_fd_set);
+
+@@ -318,10 +314,11 @@
+ }
+
+ static ALboolean set_write_native(UNUSED(void *handle),
+- UNUSED(unsigned int *bufsiz),
++ unsigned int *bufsiz,
+ ALenum *fmt,
+ unsigned int *speed) {
+ ALuint channels = _alGetChannelsFromFormat(*fmt);
++ int divisor;
+
+ if(dsp_fd < 0) {
+ return AL_FALSE;
+@@ -363,6 +360,23 @@
+
+
+ *fmt = BSD2ALFMT(*fmt, channels);
++
++ if(ioctl(dsp_fd, SNDCTL_DSP_GETBLKSIZE, bufsiz) < 0) {
++#ifdef DEBUG_MAXIMUS
++ fprintf(stderr, "blksize %d\n", *bufsiz);
++ perror("get_devsp blksize ioctl");
++#endif
++ return AL_FALSE;
++ }
++
++ divisor = _alSpot(*bufsiz) | (2<<16);
++ if(ioctl(dsp_fd, SNDCTL_DSP_SETFRAGMENT, &divisor) < 0) {
++#ifdef DEBUG_MAXIMUS
++ fprintf(stderr, "divisor %d\n", divisor);
++ perror("set_devsp fragment ioctl");
++#endif
++ return AL_FALSE;
++ }
+
+ return AL_TRUE;
+ }