mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-13 13:29:58 -05:00
Let's have just one endian conversion macro suite.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@475 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
5c01c1029f
commit
d9bfd5b294
3 changed files with 31 additions and 32 deletions
|
|
@ -200,14 +200,10 @@ enum esd_client_state {
|
|||
};
|
||||
typedef int esd_client_state_t;
|
||||
|
||||
/* switch endian order for cross platform playing */
|
||||
#define swap_endian_32(x) ((x >> 24) | ((x >> 8) & 0xFF00) | (((x & 0xFF00) << 8)) | (x << 24))
|
||||
#define maybe_swap_endian_32(c,x) ((c) ? swap_endian_32(x) : x)
|
||||
|
||||
/* the endian key is transferred in binary, if it's read into int, */
|
||||
/* and matches ESD_ENDIAN_KEY (ENDN), then the endianness of the */
|
||||
/* server and the client match; if it's SWAP_ENDIAN_KEY, swap data */
|
||||
#define ESD_SWAP_ENDIAN_KEY ((uint32_t) swap_endian_32(ESD_ENDIAN_KEY))
|
||||
#define ESD_SWAP_ENDIAN_KEY (UINT32_SWAP(ESD_ENDIAN_KEY))
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue