pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/39151: [patch] audio/openal refers to nonexistent /dev/dsp
>Number: 39151
>Category: pkg
>Synopsis: [patch] audio/openal refers to nonexistent /dev/dsp
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 15 11:20:00 +0000 2008
>Originator: Aleksej Saushev
>Release: 4.99.67
>Organization:
>Environment:
NetBSD 4.99.67 i386
>Description:
audio/openal fails to open nonexistent /dev/dsp at initialization.
>How-To-Repeat:
Build and run test program (see below), it complains about
nonexistent /dev/dsp.
Notice, that that using non-default device (pass "/dev/sound"
or "/dev/audio" to alcOpenDevice) doesn't affect execution.
al-test.c:
#include <stdlib.h>
#include <AL/al.h>
#include <AL/alc.h>
int
main(int argc, char *argv[])
{
ALCdevice *device;
ALCcontext *context;
device = alcOpenDevice(NULL); /* open default device */
if (device != NULL) alcCloseDevice(device);
}
Makefile:
PROG= al-test
MAN=
CFLAGS= -I/usr/pkg/include
LDADD+= -L/usr/pkg/lib -Wl,-rpath=/usr/pkg/lib
LDADD+= -lopenal
.include <bsd.prog.mk>
>Fix:
Apply the patch:
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/audio/openal/distinfo,v
retrieving revision 1.10
diff -u -r1.10 distinfo
--- distinfo 15 Sep 2007 11:45:57 -0000 1.10
+++ distinfo 15 Jul 2008 11:11:07 -0000
@@ -3,7 +3,7 @@
SHA1 (openal-0.0.8.tar.gz) = 31aaedc18bd26759bd51f4fa495bc4ccb08acb3e
RMD160 (openal-0.0.8.tar.gz) = 29368dbceea7cfd8b5c520b9e0f0cfdc7324e265
Size (openal-0.0.8.tar.gz) = 870671 bytes
-SHA1 (patch-aa) = a56bdb2f66d5899628ed6aa452d816f439778ccc
+SHA1 (patch-aa) = 16f321fcef8aa5478acc7fe0e9298f7cd42ba1ef
SHA1 (patch-ab) = df734f669866c728ede17d1bfc809ec6a31c43d2
SHA1 (patch-ac) = a8911a1c8f421c9043df3ed5d7054a30f92eb635
SHA1 (patch-ad) = c740552ebcb4f846faa7ac17140753a6aac4393c
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/audio/openal/patches/patch-aa,v
retrieving revision 1.3
diff -u -r1.3 patch-aa
--- patches/patch-aa 6 Apr 2007 15:47:29 -0000 1.3
+++ patches/patch-aa 15 Jul 2008 11:11:07 -0000
@@ -1,7 +1,7 @@
$NetBSD: patch-aa,v 1.3 2007/04/06 15:47:29 obache Exp $
---- src/backends/alc_backend_bsd.c.orig 2006-01-05 15:11:20.000000000
+0000
-+++ src/backends/alc_backend_bsd.c
+--- src/backends/alc_backend_bsd.c.orig 2006-01-05 18:11:20.000000000
+0300
++++ src/backends/alc_backend_bsd.c 2008-07-15 14:56:37.000000000 +0400
@@ -9,15 +9,27 @@
*/
#include "al_siteconfig.h"
@@ -30,7 +30,19 @@
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
-@@ -210,7 +222,11 @@ void release_native(void *handle) {
+@@ -112,7 +124,11 @@
+ *
+ */
+ static void *grab_write_native(void) {
++#if defined(__NetBSD__)
++ const char *dsppath = "/dev/sound";
++#else
+ const char *dsppath = "/dev/dsp";
++#endif
+ int divisor = _alSpot(_AL_DEF_BUFSIZ) | (2<<16);
+
+ dsp_fd = open(dsppath, O_WRONLY | O_NONBLOCK);
+@@ -210,7 +226,11 @@
handle_fd = *(int *) handle;
Home |
Main Index |
Thread Index |
Old Index