Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/openal-0.0.8/src/audioconvert/ac_endian.h @ 27

Last change on this file since 27 was 17, checked in by landauf, 17 years ago

added openal

File size: 761 bytes
RevLine 
[17]1/* -*- mode: C; tab-width:8; c-basic-offset:8 -*-
2 * vi:set ts=8:
3 *
4 * ac_endian.h
5 *
6 * This file contains macros and prototypes for endian management.
7 */
8
9#include "al_siteconfig.h"
10
11#include <AL/al.h>
12
13#define ac_swap16(D) ((ALushort) (((D)<<8) | ((D)>>8)))
14#define ac_swap32(D) (ALuint) ((((D)<<24) | (((D)<<8)&0x00FF0000) | (((D)>>8)&0x0000FF00) | ((D)>>24)))
15
16ALubyte *cp16le(ALubyte *rawdata, ALushort *reader16);
17ALubyte *cp32le(ALubyte *rawdata, ALuint *reader32);
18
19#ifdef WORDS_BIGENDIAN
20#define swap16le(x) ac_swap16(x)
21#define swap32le(x) ac_swap32(x)
22#define swap16be(x) (x)
23#define swap32be(x) (x)
24#else
25#define swap16le(x) (x)
26#define swap32le(x) (x)
27#define swap16be(x) ac_swap16(x)
28#define swap32be(x) ac_swap32(x)
29
30#endif /* __big_endian */
Note: See TracBrowser for help on using the repository browser.