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
32
33
34
35
36
37
38
39
40
41
42
43
|
$NetBSD: patch-ac,v 1.1.1.1 2008/12/19 04:03:22 jmcneill Exp $
--- oss/pcm_oss.c.orig 2008-10-29 08:42:13.000000000 -0400
+++ oss/pcm_oss.c
@@ -22,7 +22,11 @@
#include <sys/ioctl.h>
#include <alsa/asoundlib.h>
#include <alsa/pcm_external.h>
+#ifdef __linux__
#include <linux/soundcard.h>
+#else
+#include <sys/soundcard.h>
+#endif
typedef struct snd_pcm_oss {
snd_pcm_ioplug_t io;
@@ -116,7 +120,7 @@ static int oss_drain(snd_pcm_ioplug_t *i
snd_pcm_oss_t *oss = io->private_data;
if (io->stream == SND_PCM_STREAM_PLAYBACK)
- ioctl(oss->fd, SNDCTL_DSP_SYNC);
+ ioctl(oss->fd, SNDCTL_DSP_SYNC, NULL);
return 0;
}
@@ -125,7 +129,7 @@ static int oss_prepare(snd_pcm_ioplug_t
snd_pcm_oss_t *oss = io->private_data;
int tmp;
- ioctl(oss->fd, SNDCTL_DSP_RESET);
+ ioctl(oss->fd, SNDCTL_DSP_RESET, NULL);
tmp = io->channels;
if (ioctl(oss->fd, SNDCTL_DSP_CHANNELS, &tmp) < 0) {
@@ -355,7 +359,7 @@ static snd_pcm_ioplug_callback_t oss_cap
SND_PCM_PLUGIN_DEFINE_FUNC(oss)
{
snd_config_iterator_t i, next;
- const char *device = "/dev/dsp";
+ const char *device = DEVOSSAUDIO;
int err;
snd_pcm_oss_t *oss;
|