From a75556723f15cdceede656df317cbba3ca2c2694 Mon Sep 17 00:00:00 2001 From: Martin Blapp Date: Mon, 28 Apr 2003 21:38:38 +0000 Subject: [PATCH] Define AFMT_S16_NE for "16-bit signed format in machine's native endian convention. Needed by newer OSS ports. Reviewed by: orion PR: 27270 MFC: 2 weeks --- sys/sys/soundcard.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h index 87334134e95..e56a90fedef 100644 --- a/sys/sys/soundcard.h +++ b/sys/sys/soundcard.h @@ -95,6 +95,7 @@ #define SNDCARD_OPL 28 #include +#include #ifndef _IOWR #include #endif /* !_IOWR */ @@ -161,6 +162,13 @@ struct snd_size { #define AFMT_U16_BE 0x00000100 /* Big endian unsigned 16-bit */ #define AFMT_MPEG 0x00000200 /* MPEG MP2/MP3 audio */ #define AFMT_AC3 0x00000400 /* Dolby Digital AC3 */ + +#if BYTE_ORDER == LITTLE_ENDIAN +#define AFMT_S16_NE AFMT_S16_LE /* native endian signed 16 */ +#else +#define AFMT_S16_NE AFMT_S16_BE +#endif + /* * 32-bit formats below used for 24-bit audio data where the data is stored * in the 24 most significant bits and the least significant bits are not used