Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-gnome
Path: blob/main/audio/alsa-plugins/files/patch-oss_pcm__oss.c
16166 views
1
--- oss/pcm_oss.c.orig 2016-03-31 13:11:29 UTC
2
+++ oss/pcm_oss.c
3
@@ -22,7 +22,11 @@
4
#include <sys/ioctl.h>
5
#include <alsa/asoundlib.h>
6
#include <alsa/pcm_external.h>
7
+#ifdef __linux__
8
#include <linux/soundcard.h>
9
+#else
10
+#include <sys/soundcard.h>
11
+#endif
12
13
typedef struct snd_pcm_oss {
14
snd_pcm_ioplug_t io;
15
@@ -116,7 +120,7 @@ static int oss_drain(snd_pcm_ioplug_t *io)
16
snd_pcm_oss_t *oss = io->private_data;
17
18
if (io->stream == SND_PCM_STREAM_PLAYBACK)
19
- ioctl(oss->fd, SNDCTL_DSP_SYNC);
20
+ ioctl(oss->fd, SNDCTL_DSP_SYNC, NULL);
21
return 0;
22
}
23
24
@@ -125,7 +129,7 @@ static int oss_prepare(snd_pcm_ioplug_t *io)
25
snd_pcm_oss_t *oss = io->private_data;
26
int tmp;
27
28
- ioctl(oss->fd, SNDCTL_DSP_RESET);
29
+ ioctl(oss->fd, SNDCTL_DSP_RESET, NULL);
30
31
tmp = io->channels;
32
if (ioctl(oss->fd, SNDCTL_DSP_CHANNELS, &tmp) < 0) {
33
34