mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-12 13:30:10 -05:00
We need a logical, not an arithmetic shift here. So use unsigned types when
doing the shifting. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@456 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
262c60fcaa
commit
719c3773d4
1 changed files with 2 additions and 2 deletions
|
|
@ -28,9 +28,9 @@
|
|||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define INT16_SWAP(x) ((int16_t)(((int16_t) x >> 8) | ((int16_t) x << 8)))
|
||||
#define INT16_SWAP(x) ((int16_t)(((uint16_t) x >> 8) | ((uint16_t) x << 8)))
|
||||
#define UINT16_SWAP(x) ((uint16_t)(((uint16_t) x >> 8) | ((uint16_t) x << 8)))
|
||||
#define INT32_SWAP(x) ((int32_t)(((int32_t) x >> 24) | ((int32_t) x << 24) | (((int32_t) x & 0xFF00) << 16) | (((int32_t) x) >> 16) & 0xFF00))
|
||||
#define INT32_SWAP(x) ((int32_t)(((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 16) | (((uint32_t) x) >> 16) & 0xFF00))
|
||||
#define UINT32_SWAP(x) ((uint32_t)(((uint32_t) x >> 24) | ((uint32_t) x << 24) | (((uint32_t) x & 0xFF00) << 16) | ((((uint32_t) x) >> 16) & 0xFF00)))
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue