Linux x86-64 build of everything but the client, FARDive, and libpq. For libvitaboy Renderer, this is made possible with the new libgldemo.

This commit is contained in:
Fatbag 2012-07-02 12:14:12 -05:00
parent 9b5b1758c2
commit 90c703188b
23 changed files with 789 additions and 399 deletions

View file

@ -19,6 +19,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <limits.h>
#include "read_xa.h"
#define HINIBBLE(byte) ((byte) >> 4)
@ -29,7 +30,7 @@
#define read_uint16(x) (unsigned)(((x)[0]<<(8*0)) | ((x)[1]<<(8*1)))
#endif
unsigned xa_compressed_size(unsigned Frames, unsigned Channels)
size_t xa_compressed_size(size_t Frames, size_t Channels)
{
/* This function calculates the size of compressed XA data with known frames and channels, as such:
** Channels * (ceil(Frames/2) + ceil(Frames/28))
@ -103,7 +104,7 @@ static const int16_t XATable[] =
0, -1, -3, -4
};
int xa_decode(const uint8_t *__restrict InBuffer, uint8_t *__restrict OutBuffer, unsigned Frames, unsigned Channels)
int xa_decode(const uint8_t *__restrict InBuffer, uint8_t *__restrict OutBuffer, size_t Frames, size_t Channels)
{
channel_t Channel[8];
memset(Channel, 0, sizeof(Channel));
@ -143,4 +144,4 @@ int xa_decode(const uint8_t *__restrict InBuffer, uint8_t *__restrict OutBuffer,
if(!--Frames) return 1;
}
}
}
}

View file

@ -28,18 +28,18 @@ typedef struct
uint16_t nBlockAlign;
uint16_t wBitsPerSample;
unsigned Frames;
unsigned XADataSize;
size_t Frames;
size_t XADataSize;
} xaheader_t;
#ifdef __cplusplus
extern "C" {
#endif
unsigned xa_compressed_size(unsigned Frames, unsigned Channels);
int xa_read_header(xaheader_t * XAHeader, const uint8_t * Buffer, unsigned FileSize);
int xa_decode(const uint8_t *__restrict InBuffer, uint8_t *__restrict OutBuffer, unsigned Frames, unsigned Channels);
size_t xa_compressed_size(size_t Frames, size_t Channels);
int xa_read_header(xaheader_t * XAHeader, const uint8_t * Buffer, size_t FileSize);
int xa_decode(const uint8_t *__restrict InBuffer, uint8_t *__restrict OutBuffer, size_t Frames, size_t Channels);
#ifdef __cplusplus
}
#endif
#endif

View file

@ -49,7 +49,7 @@ int main(int argc, char *argv[]){
"\n"
"Report bugs to <X-Fi6@phppoll.org>.\n"
"xadecode is maintained by the Niotso project.\n"
"Home page: <http://www.niotso.org/>");
"Home page: <http://www.niotso.org/>\n");
return 0;
}
@ -163,4 +163,4 @@ int main(int argc, char *argv[]){
}
return 0;
}
}