mirror of
https://github.com/holub/mame
synced 2025-05-24 23:05:32 +03:00
Fix big-endian compile (nw)
This commit is contained in:
parent
92d4f9d76a
commit
9358a319fa
@ -143,11 +143,13 @@ struct FLAC__BitReader {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef LSB_FIRST
|
||||||
static FLAC__uint32 local_swap32_(FLAC__uint32 x)
|
static FLAC__uint32 local_swap32_(FLAC__uint32 x)
|
||||||
{
|
{
|
||||||
x = ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
|
x = ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
|
||||||
return (x>>16) | (x<<16);
|
return (x>>16) | (x<<16);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(_M_IX86)
|
#if defined(_MSC_VER) && defined(_M_IX86)
|
||||||
/* OPT: an MSVC built-in would be better */
|
/* OPT: an MSVC built-in would be better */
|
||||||
|
@ -112,12 +112,13 @@ struct FLAC__BitWriter {
|
|||||||
|
|
||||||
|
|
||||||
/* OPT: an MSVC built-in would be better */
|
/* OPT: an MSVC built-in would be better */
|
||||||
|
#ifdef LSB_FIRST
|
||||||
static FLAC__uint32 local_swap32_(FLAC__uint32 x)
|
static FLAC__uint32 local_swap32_(FLAC__uint32 x)
|
||||||
{
|
{
|
||||||
x = ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
|
x = ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);
|
||||||
return (x>>16) | (x<<16);
|
return (x>>16) | (x<<16);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* * WATCHOUT: The current implementation only grows the buffer. */
|
/* * WATCHOUT: The current implementation only grows the buffer. */
|
||||||
static FLAC__bool bitwriter_grow_(FLAC__BitWriter *bw, unsigned bits_to_add)
|
static FLAC__bool bitwriter_grow_(FLAC__BitWriter *bw, unsigned bits_to_add)
|
||||||
|
Loading…
Reference in New Issue
Block a user