1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
$NetBSD: patch-ac,v 1.1.1.1 2002/03/25 11:24:29 drochner Exp $
--- audio_oss.c.orig Sat Dec 9 12:12:15 2000
+++ audio_oss.c Sat Mar 23 21:32:08 2002
@@ -13,7 +13,11 @@
#include <fcntl.h>
#include <unistd.h>
#ifndef __FreeBSD__
+#ifdef __NetBSD__
+#include <soundcard.h>
+#else
#include <linux/soundcard.h>
+#endif
#else
#include <machine/soundcard.h>
#define SNDCTL_DSP_CHANNELS SNDCTL_DSP_STEREO
@@ -42,12 +46,12 @@
if (driver->descriptor==-1)
{
- driver->descriptor=open("/dev/dsp",O_WRONLY);
+ driver->descriptor=open("/dev/sound",O_WRONLY);
if (driver->descriptor!=-1)
{
int format_mask=0;
- ioctl(driver->descriptor,SNDCTL_DSP_RESET);
+ ioctl(driver->descriptor,SNDCTL_DSP_RESET, 0);
ioctl(driver->descriptor,SNDCTL_DSP_SPEED,&speed);
ioctl(driver->descriptor,SNDCTL_DSP_CHANNELS,&channels);
ioctl(driver->descriptor,SNDCTL_DSP_GETFMTS,&format_mask);
|