$NetBSD: patch-aa,v 1.2 2011/03/23 14:09:31 obache Exp $ --- include/sound.h.orig 1999-09-02 14:34:10.000000000 +0000 +++ include/sound.h @@ -215,7 +215,7 @@ struct SoundCacheBufferTag { * FreeBSD */ -#if defined(__FreeBSD__) && defined(USE_SOUND) +#if (defined(__FreeBSD__) || defined(__DragonFly__)) && defined(USE_SOUND) /* FreeBSD with SoundBlaster Pro */ @@ -233,10 +233,50 @@ struct SoundCacheBufferTag { }; #define SoundCacheBuffer struct SoundCacheBufferTag +#ifdef __DragonFly__ +#define AUDIO_DEVICE "/dev/dsp" +#else #define AUDIO_DEVICE "/dev/audio" +#endif #endif /* FreeBSD */ +/* + * NetBSD + */ + +#if defined(__NetBSD__) && defined(USE_SOUND) + +/* NetBSD with MB6258V */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#define AUDIO_DEVICE "/dev/audio" +#define AUDIO_CTLDEVICE "/dev/audioctl" +#define AUDIOMAGICNUMBER (0x2e736e64) /* ".snd" */ +#ifndef AUDIO_ENCODING_LINEAR +#define AUDIO_ENCODING_LINEAR (3) /* Linear PCM encoding */ +#endif + +#undef O_RDWR +#define O_RDWR O_WRONLY /* audio デバイスは同時オープンできない? */ + +struct SoundCacheBufferTag { + char *soundCacheBuffer; + int soundLength; + audio_info_t soundBParam; +}; + +#define SoundCacheBuffer struct SoundCacheBufferTag + +#endif /* NetBSD */ #else /* USE_NETAUDIO */