diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/voicefont.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/voicefont.c b/tools/voicefont.c index 4da67fabed..13ce4bfca2 100644 --- a/tools/voicefont.c +++ b/tools/voicefont.c | |||
@@ -32,12 +32,16 @@ | |||
32 | #define HEADER_SIZE 20 | 32 | #define HEADER_SIZE 20 |
33 | 33 | ||
34 | /* endian conversion macros */ | 34 | /* endian conversion macros */ |
35 | #if defined(__BIG_ENDIAN__) | ||
36 | #define SWAP2(x) (x) | ||
37 | #define SWAP4(x) (x) | ||
38 | #else | ||
35 | #define SWAP2(x) ((((unsigned)(x)>>8) & 0x00ff) | (((unsigned)(x)<<8) & 0xff00)) | 39 | #define SWAP2(x) ((((unsigned)(x)>>8) & 0x00ff) | (((unsigned)(x)<<8) & 0xff00)) |
36 | #define SWAP4(x) ((((unsigned)(x)>>24) & 0x000000ff) |\ | 40 | #define SWAP4(x) ((((unsigned)(x)>>24) & 0x000000ff) |\ |
37 | (((unsigned)(x)>>8) & 0x0000ff00) |\ | 41 | (((unsigned)(x)>>8) & 0x0000ff00) |\ |
38 | (((unsigned)(x)<<8) & 0x00ff0000) |\ | 42 | (((unsigned)(x)<<8) & 0x00ff0000) |\ |
39 | (((unsigned)(x)<<24) & 0xff000000)) | 43 | (((unsigned)(x)<<24) & 0xff000000)) |
40 | 44 | #endif | |
41 | 45 | ||
42 | /* bitswap audio bytes, LSB becomes MSB and vice versa */ | 46 | /* bitswap audio bytes, LSB becomes MSB and vice versa */ |
43 | int BitswapAudio (unsigned char* pDest, unsigned char* pSrc, size_t len) | 47 | int BitswapAudio (unsigned char* pDest, unsigned char* pSrc, size_t len) |
@@ -247,3 +251,4 @@ int main (int argc, char** argv) | |||
247 | return 0; | 251 | return 0; |
248 | } | 252 | } |
249 | #endif | 253 | #endif |
254 | |||