From 8bbfdf782dd1633a1f78a26584ff81b858df4a61 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka Date: Wed, 7 Jan 2009 14:28:48 +0200 Subject: Fix for big endian problems in SBC codec --- sbc/sbc.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'sbc') diff --git a/sbc/sbc.c b/sbc/sbc.c index 8fff277c..651981fa 100644 --- a/sbc/sbc.c +++ b/sbc/sbc.c @@ -1157,13 +1157,7 @@ int sbc_decode(sbc_t *sbc, void *input, int input_len, void *output, int16_t s; s = priv->frame.pcm_sample[ch][i]; -#if __BYTE_ORDER == __LITTLE_ENDIAN if (sbc->endian == SBC_BE) { -#elif __BYTE_ORDER == __BIG_ENDIAN - if (sbc->endian == SBC_LE) { -#else -#error "Unknown byte order" -#endif *ptr++ = (s & 0xff00) >> 8; *ptr++ = (s & 0x00ff); } else { @@ -1224,13 +1218,7 @@ int sbc_encode(sbc_t *sbc, void *input, int input_len, void *output, for (i = 0; i < priv->frame.subbands * priv->frame.blocks; i++) { for (ch = 0; ch < priv->frame.channels; ch++) { int16_t s; -#if __BYTE_ORDER == __LITTLE_ENDIAN if (sbc->endian == SBC_BE) -#elif __BYTE_ORDER == __BIG_ENDIAN - if (sbc->endian == SBC_LE) -#else -#error "Unknown byte order" -#endif s = (ptr[0] & 0xff) << 8 | (ptr[1] & 0xff); else s = (ptr[0] & 0xff) | (ptr[1] & 0xff) << 8; -- cgit