Changeset 2169

Show
Ignore:
Timestamp:
06/23/12 03:35:36 (12 years ago)
Author:
adi
Message:

Use ByteSwap?32 from libutil/ByteSwap.h

Closes #357

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r2158 r2169  
    6262// 32-bit byteswap function to do this. 
    6363#if __BYTE_ORDER == __BIG_ENDIAN 
     64#define RME_BYTESWAP32(x)       ByteSwap32(x) 
     65#else 
     66#define RME_BYTESWAP32(x)       (x) 
     67#endif 
     68 
    6469static inline uint32_t 
    6570ByteSwapToDevice32(uint32_t d) 
    6671{ 
    67     return byteswap_32(d); 
    68 
    69 ByteSwapFromDevice32(uint32_t d) 
    70 
    71     return byteswap_32(d); 
    72 
    73 #else 
    74 static inline uint32_t 
    75 ByteSwapToDevice32(uint32_t d) 
    76 
    77     return d; 
     72    return RME_BYTESWAP32(d); 
    7873} 
    7974static inline uint32_t 
    8075ByteSwapFromDevice32(uint32_t d) 
    8176{ 
    82     return d; 
    83 
    84 #endif 
     77    return RME_BYTESWAP32(d); 
     78
    8579 
    8680Device::Device( DeviceManager& d,