OSDN Git Service

We HAVE_LITTLE_ENDIAN.
authorElliott Hughes <enh@google.com>
Sat, 22 Nov 2014 07:34:05 +0000 (23:34 -0800)
committerElliott Hughes <enh@google.com>
Sat, 22 Nov 2014 07:34:05 +0000 (23:34 -0800)
Change-Id: I7d36cda0f4f5ba496ed5e39b54d6c243e3450e3d

audio_utils/include/audio_utils/primitives.h

index 0785358..bc55191 100644 (file)
@@ -648,14 +648,7 @@ static inline float float_from_i16(int16_t ival)
 static inline int32_t i32_from_p24(const uint8_t *packed24)
 {
     /* convert to 32b */
-#if defined(HAVE_BIG_ENDIAN) == defined(HAVE_LITTLE_ENDIAN)
-    /* check to see if we have exactly one or the other android endian flags set. */
-#error "Either HAVE_LITTLE_ENDIAN or HAVE_BIG_ENDIAN must be defined"
-#elif defined(HAVE_BIG_ENDIAN)
-    return (packed24[2] << 8) | (packed24[1] << 16) | (packed24[0] << 24);
-#else /* HAVE_LITTLE_ENDIAN */
     return (packed24[0] << 8) | (packed24[1] << 16) | (packed24[2] << 24);
-#endif
 }
 
 /* Convert a 32-bit Q0.31 value to single-precision floating-point.