Project

General

Profile

0001-Rename-audacious-byte-swap-macros-to-not-conflict-wi.patch

Brad Smith, June 09, 2012 13:23

View differences:

src/libaudcore/audio.c
66 66
TO_INT_LOOP (to_s32, int32_t, noop32, 0x00000000, 0x7fffffff)
67 67
TO_INT_LOOP (to_u32, int32_t, noop32, 0x80000000, 0x7fffffff)
68 68

  
69
static inline int16_t swap16 (int16_t i) {return GUINT16_SWAP_LE_BE (i);}
70
static inline int32_t swap32 (int32_t i) {return GUINT32_SWAP_LE_BE (i);}
71

  
72
FROM_INT_LOOP (from_s16_swap, int16_t, swap16, 0x0000, 0x7fff)
73
FROM_INT_LOOP (from_u16_swap, int16_t, swap16, 0x8000, 0x7fff)
74
FROM_INT_LOOP (from_s24_swap, int32_t, swap32, 0x000000, 0x7fffff)
75
FROM_INT_LOOP (from_u24_swap, int32_t, swap32, 0x800000, 0x7fffff)
76
FROM_INT_LOOP (from_s32_swap, int32_t, swap32, 0x00000000, 0x7fffffff)
77
FROM_INT_LOOP (from_u32_swap, int32_t, swap32, 0x80000000, 0x7fffffff)
78

  
79
TO_INT_LOOP (to_s16_swap, int16_t, swap16, 0x0000, 0x7fff)
80
TO_INT_LOOP (to_u16_swap, int16_t, swap16, 0x8000, 0x7fff)
81
TO_INT_LOOP (to_s24_swap, int32_t, swap32, 0x000000, 0x7fffff)
82
TO_INT_LOOP (to_u24_swap, int32_t, swap32, 0x800000, 0x7fffff)
83
TO_INT_LOOP (to_s32_swap, int32_t, swap32, 0x00000000, 0x7fffffff)
84
TO_INT_LOOP (to_u32_swap, int32_t, swap32, 0x80000000, 0x7fffffff)
69
static inline int16_t Aswap16 (int16_t i) {return GUINT16_SWAP_LE_BE (i);}
70
static inline int32_t Aswap32 (int32_t i) {return GUINT32_SWAP_LE_BE (i);}
71

  
72
FROM_INT_LOOP (from_s16_swap, int16_t, Aswap16, 0x0000, 0x7fff)
73
FROM_INT_LOOP (from_u16_swap, int16_t, Aswap16, 0x8000, 0x7fff)
74
FROM_INT_LOOP (from_s24_swap, int32_t, Aswap32, 0x000000, 0x7fffff)
75
FROM_INT_LOOP (from_u24_swap, int32_t, Aswap32, 0x800000, 0x7fffff)
76
FROM_INT_LOOP (from_s32_swap, int32_t, Aswap32, 0x00000000, 0x7fffffff)
77
FROM_INT_LOOP (from_u32_swap, int32_t, Aswap32, 0x80000000, 0x7fffffff)
78

  
79
TO_INT_LOOP (to_s16_swap, int16_t, Aswap16, 0x0000, 0x7fff)
80
TO_INT_LOOP (to_u16_swap, int16_t, Aswap16, 0x8000, 0x7fff)
81
TO_INT_LOOP (to_s24_swap, int32_t, Aswap32, 0x000000, 0x7fffff)
82
TO_INT_LOOP (to_u24_swap, int32_t, Aswap32, 0x800000, 0x7fffff)
83
TO_INT_LOOP (to_s32_swap, int32_t, Aswap32, 0x00000000, 0x7fffffff)
84
TO_INT_LOOP (to_u32_swap, int32_t, Aswap32, 0x80000000, 0x7fffffff)
85 85

  
86 86
typedef void (* FromFunc) (const void * in, float * out, int samples);
87 87
typedef void (* ToFunc) (const float * in, void * out, int samples);
88
-