Subject: pkg/9250: Sound doesn't work in package emulators/stella
To: None <gnats-bugs@gnats.netbsd.org>
From: maximum entropy <entropy@zippy.bernstein.com>
List: netbsd-bugs
Date: 01/19/2000 16:48:36
>Number: 9250
>Category: pkg
>Synopsis: Sound doesn't work in package emulators/stella
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager (NetBSD software packages system bug manager)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 19 16:48:00 2000
>Last-Modified:
>Originator: maximum entropy
>Organization:
>Release: <NetBSD-current source date>20000119
>Environment:
System: NetBSD zippy.bernstein.com 1.4P NetBSD 1.4P (ZIPPY) #0: Wed Jan 19 19:33:16 EST 2000 entropy@zippy.bernstein.com:/usr/src/sys/arch/i386/compile/ZIPPY i386
>Description:
Sound doesn't work in package emulators/stella.
The patch-aa file is incorrect.
The patch changes OSS.c to open /dev/mixer instead of /dev/dsp.
Instead, /dev/sound should be opened.
>How-To-Repeat:
Build and install emulators/stella.
Run xstella with a valid cart file as input, and notice that stella-sound
will die with error message "stella-sound: Unable to set 8-bit sample mode!".
>Fix:
Replace emulators/stella/patches/patch-aa with the following corrected
patch:
$NetBSD: patch-aa,v 1.1.1.1 1999/05/18 23:14:16 tv Exp $
--- ../ui/sound/OSS.c.orig Tue May 18 10:19:45 1999
+++ ../ui/sound/OSS.c Tue May 18 10:24:03 1999
@@ -32,11 +32,7 @@
#include <sys/types.h>
#include <unistd.h>
-#ifdef __FreeBSD__
- #include <machine/soundcard.h>
-#else
- #include <sys/soundcard.h>
-#endif
+#include <soundcard.h>
#include "TIASound.h"
@@ -61,9 +57,9 @@
int mute = 0;
/* Open the sound device for writing */
- if((fd = open("/dev/dsp", O_WRONLY, 0)) == -1)
+ if((fd = open("/dev/sound", O_WRONLY, 0)) == -1)
{
- printf("stella-sound: Unable to open /dev/dsp device!\n");
+ printf("stella-sound: Unable to open /dev/sound device!\n");
return 1;
}
>Audit-Trail:
>Unformatted: