mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 05:41:52 +00:00
code to cope with -DLIBVORBISFILE_STATIC for moodles to use his statically linked libogg/libvorbis.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4137 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
0fda04dc46
commit
b184da13a4
2 changed files with 33 additions and 20 deletions
|
@ -13,6 +13,15 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef LIBVORBISFILE_STATIC
|
||||||
|
#define p_ov_open_callbacks ov_open_callbacks
|
||||||
|
#define p_ov_clear ov_clear
|
||||||
|
#define p_ov_info ov_info
|
||||||
|
#define p_ov_comment ov_comment
|
||||||
|
#define p_ov_pcm_total ov_pcm_total
|
||||||
|
#define p_ov_read ov_read
|
||||||
|
#define p_ov_pcm_seek ov_pcm_seek
|
||||||
|
#else
|
||||||
#if defined(__MORPHOS__)
|
#if defined(__MORPHOS__)
|
||||||
|
|
||||||
#define oggvorbislibrary VorbisFileBase
|
#define oggvorbislibrary VorbisFileBase
|
||||||
|
@ -40,6 +49,7 @@
|
||||||
int bigendianp,int word,int sgned,int *bitstream);
|
int bigendianp,int word,int sgned,int *bitstream);
|
||||||
int (VARGS *p_ov_pcm_seek)(OggVorbis_File *vf,ogg_int64_t pos);
|
int (VARGS *p_ov_pcm_seek)(OggVorbis_File *vf,ogg_int64_t pos);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -307,6 +317,7 @@ static ov_callbacks callbacks = {
|
||||||
};
|
};
|
||||||
qboolean OV_StartDecode(unsigned char *start, unsigned long length, ovdecoderbuffer_t *buffer)
|
qboolean OV_StartDecode(unsigned char *start, unsigned long length, ovdecoderbuffer_t *buffer)
|
||||||
{
|
{
|
||||||
|
#ifndef LIBVORBISFILE_STATIC
|
||||||
static qboolean tried;
|
static qboolean tried;
|
||||||
#ifndef __MORPHOS__
|
#ifndef __MORPHOS__
|
||||||
static dllfunction_t funcs[] =
|
static dllfunction_t funcs[] =
|
||||||
|
@ -321,7 +332,6 @@ qboolean OV_StartDecode(unsigned char *start, unsigned long length, ovdecoderbuf
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
static void *libhandle;
|
|
||||||
|
|
||||||
if (!oggvorbislibrary && !tried)
|
if (!oggvorbislibrary && !tried)
|
||||||
#if defined(__MORPHOS__)
|
#if defined(__MORPHOS__)
|
||||||
|
@ -355,6 +365,7 @@ qboolean OV_StartDecode(unsigned char *start, unsigned long length, ovdecoderbuf
|
||||||
Con_Printf("ogg vorbis library is not loaded.\n");
|
Con_Printf("ogg vorbis library is not loaded.\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
buffer->start = start;
|
buffer->start = start;
|
||||||
buffer->length = length;
|
buffer->length = length;
|
||||||
|
|
|
@ -105,6 +105,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
//#define DYNAMIC_ZLIB
|
//#define DYNAMIC_ZLIB
|
||||||
//#define DYNAMIC_LIBPNG
|
//#define DYNAMIC_LIBPNG
|
||||||
//#define DYNAMIC_LIBJPEG
|
//#define DYNAMIC_LIBJPEG
|
||||||
|
//#define LIBVORBISFILE_STATIC
|
||||||
|
//#define SPEEX_STATIC
|
||||||
|
|
||||||
#ifdef D3DQUAKE
|
#ifdef D3DQUAKE
|
||||||
#define D3D9QUAKE
|
#define D3D9QUAKE
|
||||||
|
|
Loading…
Reference in a new issue