]> granicus.if.org Git - python/commitdiff
This module has a poor name, since it can be used under FreeBSD and
authorJeremy Hylton <jeremy@alum.mit.edu>
Thu, 31 Aug 2000 18:11:07 +0000 (18:11 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Thu, 31 Aug 2000 18:11:07 +0000 (18:11 +0000)
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)

Modules/linuxaudiodev.c

index 5bcbaf2854da5ff8df108252029b053ccacdd71b..72ba5670617e28872e5e1bf7f36ad0e32495b658 100644 (file)
 #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 */