[pulseaudio-commits] r2098 - /trunk/src/pulse/sample.h
svnmailer-noreply at 0pointer.de
svnmailer-noreply at 0pointer.de
Sun Jan 6 12:38:14 PST 2008
Author: lennart
Date: Sun Jan 6 21:38:11 2008
New Revision: 2098
URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=2098&root=pulseaudio&view=rev
Log:
use __BYTE_ORDER macro for detecting byte order, as suggested on http://unixpapa.com/incnote/byteorder.html
Modified:
trunk/src/pulse/sample.h
Modified: trunk/src/pulse/sample.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/pulse/sample.h?rev=2098&root=pulseaudio&r1=2097&r2=2098&view=diff
==============================================================================
--- trunk/src/pulse/sample.h (original)
+++ trunk/src/pulse/sample.h Sun Jan 6 21:38:11 2008
@@ -27,6 +27,7 @@
#include <inttypes.h>
#include <sys/types.h>
+#include <sys/param.h>
#include <math.h>
#include <pulse/cdecl.h>
@@ -103,6 +104,14 @@
* Constants and routines for sample type handling */
PA_C_DECL_BEGIN
+
+#if !defined(WORDS_BIGENDIAN)
+#if defined(__BYTE_ORDER)
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define WORDS_BIGENDIAN
+#endif
+#endif
+#endif
/** Maximum number of allowed channels */
#define PA_CHANNELS_MAX 32
More information about the pulseaudio-commits
mailing list