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

@ -1,6 +1,14 @@
cmake_minimum_required(VERSION 2.6)
project(FileHandler)
set(FILEHANDLER_SERIES 0)
set(FILEHANDLER_MAJOR 0)
set(FILEHANDLER_MINOR 0)
if(64BIT)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic")
endif()
add_subdirectory(far)
add_subdirectory(iff)
add_subdirectory(libexpat)
@ -11,10 +19,6 @@ add_subdirectory(utk)
add_subdirectory(xa)
add_subdirectory(zlib)
set(FILEHANDLER_SERIES 0)
set(FILEHANDLER_MAJOR 0)
set(FILEHANDLER_MINOR 0)
set(FILEHANDLER_SOURCES
Audio.cpp
File.cpp
@ -46,4 +50,5 @@ set_target_properties(FileHandler_shared PROPERTIES
PREFIX ""
IMPORT_PREFIX ""
CLEAN_DIRECT_OUTPUT 1)
target_link_libraries(FileHandler_shared kernel32 far_static iff_static jpegturbo_static libmpg123_static libpng_static zlib_static)
target_link_libraries(FileHandler_shared far_static iff_static jpegturbo_static libmpg123_static libpng_static zlib_static m)

View file

@ -23,6 +23,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <limits.h>
#ifndef read_uint32be
#define read_int32be(x) (signed)(((x)[0]<<(8*3)) | ((x)[1]<<(8*2)) | ((x)[2]<<(8*1)) | ((x)[3]<<(8*0)))
@ -361,4 +362,4 @@ void iff_delete(IFFFile * IFFFileInfo);
}
#endif
#endif
#endif

View file

@ -82,7 +82,7 @@ int utk_read_header(utkheader_t * UTKHeader, const uint8_t * Buffer, size_t File
return 1;
}
int utk_decode(const uint8_t *__restrict InBuffer, uint8_t *__restrict OutBuffer, unsigned Frames){
int utk_decode(const uint8_t *__restrict InBuffer, uint8_t *__restrict OutBuffer, size_t Frames){
utkparams_t p;
p.InData = InBuffer;
SetUTKParameters(&p);
@ -336,4 +336,4 @@ static void PredictionFilter(const float *__restrict ImpulseTrain, float *__rest
Residual[i] = x;
}
}
}

View file

@ -50,10 +50,10 @@ typedef struct {
extern "C" {
#endif
int utk_read_header(utkheader_t * UTKHeader, const uint8_t * Buffer, unsigned FileSize);
int utk_decode(const uint8_t *__restrict InBuffer, uint8_t *__restrict OutBuffer, unsigned Frames);
int utk_read_header(utkheader_t * UTKHeader, const uint8_t * Buffer, size_t FileSize);
int utk_decode(const uint8_t *__restrict InBuffer, uint8_t *__restrict OutBuffer, size_t Frames);
void UTKGenerateTables(void);
#ifdef __cplusplus
}
#endif
#endif

View file

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

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;
}
}