1
0
Fork 0

Byteswap captured audio samples on PPC

Fixes: #161
This commit is contained in:
Patryk Obara 2020-02-08 14:56:14 +01:00
parent e0e17ac6d9
commit 77c4523723
2 changed files with 19 additions and 13 deletions

View file

@ -116,6 +116,10 @@ static INLINE void host_writed(HostPt off,Bit32u val) {
#if defined(WORDS_BIGENDIAN)
constexpr static INLINE int16_t host_to_le(int16_t val) {
return __builtin_bswap16(val);
}
constexpr static INLINE uint16_t host_to_le(uint16_t val) {
return __builtin_bswap16(val);
}
@ -126,6 +130,10 @@ constexpr static INLINE uint32_t host_to_le(uint32_t val) {
#else
constexpr static INLINE int16_t host_to_le(int16_t val) {
return val;
}
constexpr static INLINE uint16_t host_to_le(uint16_t val) {
return val;
}