openal-20040816, cross-platform 3D audio API

This commit is contained in:
jolan 2004-10-21 05:04:16 +00:00
parent 9df8098610
commit 460ff833fb
8 changed files with 136 additions and 0 deletions

29
audio/openal/Makefile Normal file
View File

@ -0,0 +1,29 @@
# $OpenBSD: Makefile,v 1.1.1.1 2004/10/21 05:04:16 jolan Exp $
COMMENT= "cross-platform 3D audio API"
DISTNAME= openal-20040816
CATEGORIES= audio
MASTER_SITES= http://math.smsu.edu/~erik/files/fbsd/ \
http://www.smluc.org/~erik/files/fbsd/
HOMEPAGE= http://www.openal.org/
# LGPL
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
LIB_DEPENDS= vorbis.3.0,vorbisfile.4.0::audio/libvorbis
NO_REGRESS= Yes
USE_GMAKE= Yes
WRKSRC= ${WRKDIST}/linux
CONFIGURE_STYLE=gnu
CONFIGURE_ARGS+=--enable-vorbis
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" LDFLAGS="-L${LOCALBASE}/lib" \
LIBS="-logg"
.include <bsd.port.mk>

3
audio/openal/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (openal-20040816.tar.gz) = 3bafc23470f2885d4f08b52cae01211e
RMD160 (openal-20040816.tar.gz) = ec02d6b918d9d6d7f2387fd3d14cfe0a47e034ef
SHA1 (openal-20040816.tar.gz) = 0a7939c30176aace28170ce2aa96f19efa00110a

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-linux_Makefile_in,v 1.1.1.1 2004/10/21 05:04:16 jolan Exp $
--- linux/Makefile.in.orig 2002-09-06 00:54:36.000000000 +0200
+++ linux/Makefile.in 2004-01-10 22:26:25.000000000 +0100
@@ -1,13 +1,13 @@
INSTALL=@INSTALL@
LN_S=@LN_S@
-DESTDIR=@prefix@/
-DESTINC=$(DESTDIR)include
-DESTLIB=$(DESTDIR)lib
+_DESTDIR=$(DESTDIR)@prefix@/
+DESTINC=$(_DESTDIR)include
+DESTLIB=$(_DESTDIR)lib
MAKE=@MAKE@
MAJOR_VERSION=@MAJOR_VERSION@
MINOR_VERSION=@MINOR_VERSION@
MICRO_VERSION=@MICRO_VERSION@
-VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
+VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
SO_EXT=@SHARED_LIBRARY_EXT@
DO_MINOR_LIBS=@DO_MINOR_LIBS@
INSTALL_DEPS=all

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-linux_src_Makefile_in,v 1.1.1.1 2004/10/21 05:04:16 jolan Exp $
--- linux/src/Makefile.in.orig Sun Feb 15 07:23:30 2004
+++ linux/src/Makefile.in Wed Oct 20 23:37:16 2004
@@ -1,7 +1,7 @@
AS=as
CC=@CC@
CPP=/lib/cpp
-CFLAGS=@CFLAGS@
+CFLAGS=@CPPFLAGS@ @CFLAGS@
DEFINES=@DEFINES@
LDFLAGS=@LDFLAGS@
INC=-I../../include -I../include -I../audioconvert -Iarch -I. @INCLUDES@
@@ -74,7 +74,7 @@ AL_OBJS+=$(INTERFACE_OBJS) @OS_OBJS@ @AR
MAJOR_VERSION=@MAJOR_VERSION@
MINOR_VERSION=@MINOR_VERSION@
MICRO_VERSION=@MICRO_VERSION@
-VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
+VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
%.o : %.s al_siteconfig.h ../config.h
$(CPP) $(DEFINES) $< | $(AS) -o $@

View File

@ -0,0 +1,42 @@
$OpenBSD: patch-linux_src_arch_bsd_bsd_dsp_c,v 1.1.1.1 2004/10/21 05:04:16 jolan Exp $
--- linux/src/arch/bsd/bsd_dsp.c.orig 2003-06-20 11:18:33.000000000 -0700
+++ linux/src/arch/bsd/bsd_dsp.c 2004-01-10 08:23:30.000000000 -0800
@@ -15,7 +15,7 @@
#include <assert.h>
#include <fcntl.h>
-#include <sys/soundcard.h>
+#include <soundcard.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -112,7 +112,7 @@ static int AL2BSDFMT(int fmt)
*
*/
void *grab_write_native(void) {
- const char *dsppath = "/dev/dsp";
+ const char *dsppath = "/dev/audio";
int divisor = _alSpot(_AL_DEF_BUFSIZ) | (2<<16);
dsp_fd = open(dsppath, O_WRONLY | O_NONBLOCK);
@@ -148,9 +148,11 @@ int grab_mixerfd(void) {
mixer_fd = open("/dev/mixer", O_WRONLY | O_NONBLOCK);
if(mixer_fd > 0) {
+#if 0
if(fcntl(mixer_fd, F_SETFL, ~O_NONBLOCK) == -1) {
perror("fcntl");
}
+#endif
return mixer_fd;
} else {
@@ -212,7 +214,7 @@ void release_native(void *handle) {
handle_fd = *(int *) handle;
- if(ioctl(handle_fd, SNDCTL_DSP_RESET) < 0) {
+ if(ioctl(handle_fd, SNDCTL_DSP_RESET, NULL) < 0) {
#ifdef DEBUG_MAXIMUS
fprintf(stderr, "Couldn't reset dsp\n");
#endif

2
audio/openal/pkg/DESCR Normal file
View File

@ -0,0 +1,2 @@
OpenAL is a cross-platform 3D audio API appropriate for use with
gaming applications and many other types of audio applications.

View File

@ -0,0 +1,2 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2004/10/21 05:04:16 jolan Exp $
@lib lib/libopenal.so.0.0

16
audio/openal/pkg/PLIST Normal file
View File

@ -0,0 +1,16 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/10/21 05:04:16 jolan Exp $
include/AL/
include/AL/al.h
include/AL/alc.h
include/AL/alctypes.h
include/AL/alext.h
include/AL/alexttypes.h
include/AL/altypes.h
include/AL/alu.h
include/AL/alut.h
include/AL/aluttypes.h
include/AL/alutypes.h
lib/libopenal.a
%%SHARED%%
@comment lib/libopenal.so
@comment lib/libopenal.so.0