$NetBSD: patch-ac,v 1.5 2003/03/22 05:44:38 dillo Exp $ --- audioIO_SunOS.c.orig Sat May 31 13:47:58 1997 +++ audioIO_SunOS.c @@ -8,7 +8,11 @@ #include "amp.h" #include +#ifndef OS_NetBSD #include +#else +#include +#endif #include #include #include @@ -31,13 +35,12 @@ audioOpen(int frequency, int stereo, int { int res; - if ((audio_fd = open("/dev/audio",O_RDWR))==-1) { + if ((audio_fd = open("/dev/audio",O_WRONLY))==-1) { die(" unable to open the audio device\n"); } DB(audio, msg("Audio device opened on %d\n",audio_fd) ); - if (ioctl(audio_fd,AUDIO_GETINFO,&auinfo)<0) - die("Unable to get audio info\n"); + AUDIO_INITINFO(&auinfo); auinfo.play.precision=16; auinfo.play.encoding=AUDIO_ENCODING_LINEAR;