diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-08-31 18:11:07 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-08-31 18:11:07 (GMT) |
commit | a3895c0d291c795ed9e36fd86118d6679f1d917b (patch) | |
tree | c8aeebe86866d20aa657bdc92eba06fc0a49b9ec | |
parent | 4bcc7c51196cedcfcd3e6929551d9647f786df3d (diff) | |
download | cpython-a3895c0d291c795ed9e36fd86118d6679f1d917b.zip cpython-a3895c0d291c795ed9e36fd86118d6679f1d917b.tar.gz cpython-a3895c0d291c795ed9e36fd86118d6679f1d917b.tar.bz2 |
This module has a poor name, since it can be used under FreeBSD and
Linux. Perhaps winaudio would be better, as it would offend both
parties equally.
tg@freebsd.org: allow this module to compile under FreeBSD
(he suggests voxwareaudio)
-rw-r--r-- | Modules/linuxaudiodev.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Modules/linuxaudiodev.c b/Modules/linuxaudiodev.c index 5bcbaf2..72ba567 100644 --- a/Modules/linuxaudiodev.c +++ b/Modules/linuxaudiodev.c @@ -27,10 +27,20 @@ #endif #include <sys/ioctl.h> +#if defined(linux) #include <linux/soundcard.h> typedef unsigned long uint32_t; +#elif defined(__FreeBSD__) +#include <machine/soundcard.h> + +#ifndef SNDCTL_DSP_CHANNELS +#define SNDCTL_DSP_CHANNELS SOUND_PCM_WRITE_CHANNELS +#endif + +#endif + typedef struct { PyObject_HEAD; int x_fd; /* The open file */ |