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:
Spoike 2012-10-24 01:32:10 +00:00
parent 0fda04dc46
commit b184da13a4
2 changed files with 33 additions and 20 deletions

View File

@ -13,6 +13,15 @@
#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__)
#define oggvorbislibrary VorbisFileBase
@ -40,6 +49,7 @@
int bigendianp,int word,int sgned,int *bitstream);
int (VARGS *p_ov_pcm_seek)(OggVorbis_File *vf,ogg_int64_t pos);
#endif
#endif
typedef struct {
@ -307,6 +317,7 @@ static ov_callbacks callbacks = {
};
qboolean OV_StartDecode(unsigned char *start, unsigned long length, ovdecoderbuffer_t *buffer)
{
#ifndef LIBVORBISFILE_STATIC
static qboolean tried;
#ifndef __MORPHOS__
static dllfunction_t funcs[] =
@ -321,7 +332,6 @@ qboolean OV_StartDecode(unsigned char *start, unsigned long length, ovdecoderbuf
{NULL}
};
#endif
static void *libhandle;
if (!oggvorbislibrary && !tried)
#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");
return false;
}
#endif
buffer->start = start;
buffer->length = length;

View File

@ -105,6 +105,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//#define DYNAMIC_ZLIB
//#define DYNAMIC_LIBPNG
//#define DYNAMIC_LIBJPEG
//#define LIBVORBISFILE_STATIC
//#define SPEEX_STATIC
#ifdef D3DQUAKE
#define D3D9QUAKE