3 XXXbjs: I use amd64, and audioop is broken on 64-bit platforms.
4 Thus, this needs to be tested.
6 --- Modules/sunaudiodev.c.orig 2010-05-09 14:46:46.000000000 +0000
7 +++ Modules/sunaudiodev.c
8 @@ -224,7 +224,11 @@ sad_ibufcount(sadobject *self)
12 +#if defined(__NetBSD__) && defined(AUDIO_GETBUFINFO)
13 + if (ioctl(self->x_fd, AUDIO_GEBUFTINFO, &ai) < 0) {
15 if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) {
17 PyErr_SetFromErrno(SunAudioError);
20 @@ -236,7 +240,11 @@ sad_obufcount(sadobject *self)
24 +#if defined(__NetBSD__) && defined(AUDIO_GETBUFINFO)
25 + if (ioctl(self->x_fd, AUDIO_GETBUFINFO, &ai) < 0) {
27 if (ioctl(self->x_fd, AUDIO_GETINFO, &ai) < 0) {
29 PyErr_SetFromErrno(SunAudioError);
32 @@ -275,7 +283,11 @@ sad_getdev(sadobject *self)
34 sad_flush(sadobject *self)
36 +#if defined(__NetBSD__) || defined(__OpenBSD__)
37 + if (ioctl(self->x_fd, AUDIO_FLUSH, NULL) < 0) {
39 if (ioctl(self->x_fd, I_FLUSH, FLUSHW) < 0) {
41 PyErr_SetFromErrno(SunAudioError);