| @@ -1,33 +1,33 @@ | | | @@ -1,33 +1,33 @@ |
1 | $NetBSD: patch-af,v 1.2 2012/01/11 20:14:10 hans Exp $ | | 1 | $NetBSD: patch-af,v 1.3 2013/12/15 20:14:16 asau Exp $ |
2 | | | 2 | |
3 | --- pa_unix_oss/pa_unix_oss.c~ Mon Jun 30 11:05:50 2003 | | 3 | --- pa_unix_oss/pa_unix_oss.c~ Mon Jun 30 11:05:50 2003 |
4 | +++ pa_unix_oss/pa_unix_oss.c Wed Nov 26 02:40:25 2003 | | 4 | +++ pa_unix_oss/pa_unix_oss.c Wed Nov 26 02:40:25 2003 |
5 | @@ -43,10 +43,15 @@ | | 5 | @@ -43,10 +43,15 @@ |
6 | | | 6 | |
7 | #ifdef __linux__ | | 7 | #ifdef __linux__ |
8 | #include <linux/soundcard.h> | | 8 | #include <linux/soundcard.h> |
9 | +#elif defined(__sun) | | 9 | +#elif defined(__sun) || defined(__FreeBSD__) |
10 | +#include <sys/soundcard.h> | | 10 | +#include <sys/soundcard.h> |
11 | #else | | 11 | #else |
12 | #include <machine/soundcard.h> /* JH20010905 */ | | 12 | #include <machine/soundcard.h> /* JH20010905 */ |
13 | #endif | | 13 | #endif |
14 | | | 14 | |
15 | +#ifdef __NetBSD__ | | 15 | +#ifdef __NetBSD__ |
16 | +#include <sys/audioio.h> | | 16 | +#include <sys/audioio.h> |
17 | +#endif | | 17 | +#endif |
18 | | | 18 | |
19 | #ifndef AFMT_S16_NE | | 19 | #ifndef AFMT_S16_NE |
20 | #define AFMT_S16_NE Get_AFMT_S16_NE() | | 20 | #define AFMT_S16_NE Get_AFMT_S16_NE() |
21 | @@ -236,7 +241,11 @@ PaError Pa_SetupDeviceFormat( int devHan | | 21 | @@ -236,7 +241,11 @@ PaError Pa_SetupDeviceFormat( int devHan |
22 | ERR_RPT(("Pa_SetupDeviceFormat: HW does not support AFMT_S16_NE\n" )); | | 22 | ERR_RPT(("Pa_SetupDeviceFormat: HW does not support AFMT_S16_NE\n" )); |
23 | return paHostError; | | 23 | return paHostError; |
24 | } | | 24 | } |
25 | - | | 25 | - |
26 | +#ifdef __NetBSD__ | | 26 | +#ifdef __NetBSD__ |
27 | + tmp = 1; | | 27 | + tmp = 1; |
28 | + ioctl(devHandle, AUDIO_SETFD, &tmp); /* set full-duplex operations, | | 28 | + ioctl(devHandle, AUDIO_SETFD, &tmp); /* set full-duplex operations, |
29 | + * ignore the output on non-fd cards */ | | 29 | + * ignore the output on non-fd cards */ |
30 | +#endif | | 30 | +#endif |
31 | | | 31 | |
32 | /* Set number of channels. */ | | 32 | /* Set number of channels. */ |
33 | tmp = numChannels; | | 33 | tmp = numChannels; |