blob: a9bdab290416fe51dad0f5b04e6f8a5f8306bbf7 (
plain)
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
|
$NetBSD: patch-af,v 1.3 2013/12/15 20:14:16 asau Exp $
--- pa_unix_oss/pa_unix_oss.c~ Mon Jun 30 11:05:50 2003
+++ pa_unix_oss/pa_unix_oss.c Wed Nov 26 02:40:25 2003
@@ -43,10 +43,15 @@
#ifdef __linux__
#include <linux/soundcard.h>
+#elif defined(__sun) || defined(__FreeBSD__)
+#include <sys/soundcard.h>
#else
#include <machine/soundcard.h> /* JH20010905 */
#endif
+#ifdef __NetBSD__
+#include <sys/audioio.h>
+#endif
#ifndef AFMT_S16_NE
#define AFMT_S16_NE Get_AFMT_S16_NE()
@@ -236,7 +241,11 @@ PaError Pa_SetupDeviceFormat( int devHan
ERR_RPT(("Pa_SetupDeviceFormat: HW does not support AFMT_S16_NE\n" ));
return paHostError;
}
-
+#ifdef __NetBSD__
+ tmp = 1;
+ ioctl(devHandle, AUDIO_SETFD, &tmp); /* set full-duplex operations,
+ * ignore the output on non-fd cards */
+#endif
/* Set number of channels. */
tmp = numChannels;
|