mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-13 20:42:11 +00:00
Address some macro madness in jaudiolib. (Should fix PowerPC builds.)
git-svn-id: https://svn.eduke32.com/eduke32@3370 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2bb8b4c461
commit
05a550c08d
5 changed files with 18 additions and 37 deletions
|
@ -35,9 +35,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "inttypes.h"
|
||||
#include "multivoc.h"
|
||||
|
||||
#define TRUE ( 1 == 1 )
|
||||
#define FALSE ( !TRUE )
|
||||
|
||||
#define VOC_8BIT 0x0
|
||||
#define VOC_CT4_ADPCM 0x1
|
||||
#define VOC_CT3_ADPCM 0x2
|
||||
|
|
|
@ -256,11 +256,7 @@ FLAC__StreamDecoderWriteStatus write_flac_stream(const FLAC__StreamDecoder *deco
|
|||
val=(1<<(voice->bits-1))-1;
|
||||
else if(val<-(1<<(voice->bits-1)))
|
||||
val=-(1<<(voice->bits-1));
|
||||
#ifdef BIGENDIAN
|
||||
for (byte = voice->bits-8; byte >=0; byte -= 8)
|
||||
#else
|
||||
for (byte = 0; byte < voice->bits; byte += 8)
|
||||
#endif
|
||||
*obuffer++=((val>>byte)&0x000000FF);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,17 +36,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "multivoc.h"
|
||||
#include "fx_man.h"
|
||||
|
||||
#if defined __POWERPC__ || defined GEKKO
|
||||
#define LITTLE16(s) (((uint16_t)(s) >> 8) | ((uint16_t)(s) << 8))
|
||||
#define LITTLE32(s) ((uint32_t)(s) >> 24) | ((uint32_t)(s) << 24) | (((uint32_t)(s)&0xff00) << 8) | (((uint32_t)(s) & 0xff0000) >> 8)
|
||||
#else
|
||||
#define LITTLE16
|
||||
#define LITTLE32
|
||||
#endif
|
||||
|
||||
#define TRUE ( 1 == 1 )
|
||||
#define FALSE ( !TRUE )
|
||||
|
||||
int32_t FX_ErrorCode = FX_Ok;
|
||||
int32_t FX_Installed = FALSE;
|
||||
|
||||
|
|
|
@ -52,22 +52,6 @@ static int16_t *MV_GetVolumeTable( int32_t vol );
|
|||
static void MV_CalcVolume( int32_t MaxLevel );
|
||||
static void MV_CalcPanTable( void );
|
||||
|
||||
static inline uint16_t SWAP16(uint16_t s)
|
||||
{
|
||||
return (s >> 8) | (s << 8);
|
||||
}
|
||||
|
||||
static inline uint32_t SWAP32(uint32_t s)
|
||||
{
|
||||
return (s >> 24) | (s << 24) | ((s&0xff00) << 8) | ((s & 0xff0000) >> 8);
|
||||
}
|
||||
|
||||
#ifndef min
|
||||
#define min(x,y) ((x) < (y) ? (x) : (y))
|
||||
#endif
|
||||
#ifndef max
|
||||
#define max(x,y) ((x) > (y) ? (x) : (y))
|
||||
#endif
|
||||
/*
|
||||
#define RoundFixed( fixedval, bits ) \
|
||||
( \
|
||||
|
|
|
@ -39,14 +39,29 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
# define inline __inline
|
||||
#endif
|
||||
|
||||
#ifdef __POWERPC__
|
||||
# define LITTLE16 SWAP16
|
||||
# define LITTLE32 SWAP32
|
||||
#if defined __POWERPC__ || defined GEKKO
|
||||
static inline uint16_t SWAP16(uint16_t s)
|
||||
{
|
||||
return (s >> 8) | (s << 8);
|
||||
}
|
||||
static inline uint32_t SWAP32(uint32_t s)
|
||||
{
|
||||
return (s >> 24) | (s << 24) | ((s&0xff00) << 8) | ((s & 0xff0000) >> 8);
|
||||
}
|
||||
# define LITTLE16(s) SWAP16(s)
|
||||
# define LITTLE32(s) SWAP32(s)
|
||||
#else
|
||||
# define LITTLE16
|
||||
# define LITTLE32
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
# define TRUE ( 1 == 1 )
|
||||
#endif
|
||||
#ifndef FALSE
|
||||
# define FALSE ( !TRUE )
|
||||
#endif
|
||||
|
||||
#ifndef min
|
||||
# define min(x,y) ((x) < (y) ? (x) : (y))
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue