summaryrefslogtreecommitdiffstats
path: root/sys/sys/soundcard.h
diff options
context:
space:
mode:
authormbr <mbr@FreeBSD.org>2003-04-28 21:38:38 +0000
committermbr <mbr@FreeBSD.org>2003-04-28 21:38:38 +0000
commit39b0244bbd13d1094799e4f03909abdc73651c9e (patch)
treec6ae41744a28acba5fe17a44529794e160d12a55 /sys/sys/soundcard.h
parent4d8bc81d7dbf95940ea714cfb3e40d8c78315341 (diff)
downloadFreeBSD-src-39b0244bbd13d1094799e4f03909abdc73651c9e.zip
FreeBSD-src-39b0244bbd13d1094799e4f03909abdc73651c9e.tar.gz
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
Diffstat (limited to 'sys/sys/soundcard.h')
-rw-r--r--sys/sys/soundcard.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h
index 8733413..e56a90f 100644
--- a/sys/sys/soundcard.h
+++ b/sys/sys/soundcard.h
@@ -95,6 +95,7 @@
#define SNDCARD_OPL 28
#include <sys/types.h>
+#include <machine/endian.h>
#ifndef _IOWR
#include <sys/ioccom.h>
#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
OpenPOWER on IntegriCloud