1 /*  Header file for endian.c          */
2 /*  Joshua Weage   gte855f@prism.gatech.edu  */
3 
4 #ifndef _GETBIG
5 #define _GETBIG 1
6 
7 #include <sys/types.h>
8 
9 extern u_short SwapTwoBytes (u_short);
10 extern u_int32_t SwapFourBytes (u_int32_t);
11 extern sample_t SwapSample (sample_t);
12 
13 /* macro to swap endianness of values in a sample_t with */
14 /* a few 32-bit operations -- very fast                  */
15 #define SWAPSAMPLEREF(s) *((uint32_t *)(s)) = \
16 	((*((uint32_t *)(s)) & 0xff00ff00) >> 8) | \
17 	((*((uint32_t *)(s)) & 0x00ff00ff) << 8)
18 
19 #endif
20