diff options
author | Siarhei Siamashka <siarhei.siamashka@nokia.com> | 2009-01-07 14:28:48 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2012-07-29 19:48:27 -0700 |
commit | ef216ad20b90b97648c6704ee0476c3fa61d7c09 (patch) | |
tree | ed5e2618ccf05451bb676ae4dbb9afc3a51a351a | |
parent | e9507c9e3064695d9a36d5f46cdb7fa58a1f4d99 (diff) | |
download | sbc-ef216ad20b90b97648c6704ee0476c3fa61d7c09.tar.gz |
sbc: Fix for big endian problems in SBC codec
-rw-r--r-- | sbc/sbc.c | 12 |
1 files changed, 0 insertions, 12 deletions
@@ -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; |