From 4c7a460d6aae20f8fbb6e9b87f332a622d30053c Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Tue, 12 Jan 2016 10:31:05 +0000 Subject: [PATCH] Add some UNREFERENCED_PARAMETER for when Vorbis or FLAC are disabled. git-svn-id: https://svn.eduke32.com/eduke32@5554 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/common.c | 4 ++++ polymer/eduke32/source/common_game.h | 5 +++++ polymer/eduke32/source/jaudiolib/src/flac.c | 20 +++++++++++++++++++ polymer/eduke32/source/jaudiolib/src/vorbis.c | 20 +++++++++++++++++++ 4 files changed, 49 insertions(+) diff --git a/polymer/eduke32/source/common.c b/polymer/eduke32/source/common.c index 0f5603d7e..8618f177f 100644 --- a/polymer/eduke32/source/common.c +++ b/polymer/eduke32/source/common.c @@ -1029,6 +1029,8 @@ void G_LoadLookups(void) ////////// +#ifdef FORMAT_UPGRADE_ELIGIBLE + static int32_t S_TryFormats(char * const testfn, char * const fn_suffix, char const searchfirst) { #ifdef HAVE_FLAC @@ -1137,3 +1139,5 @@ int32_t S_OpenAudio(const char *fn, char searchfirst, uint8_t const ismusic) Bfree(testfn); return origfp; } + +#endif diff --git a/polymer/eduke32/source/common_game.h b/polymer/eduke32/source/common_game.h index 7b22267d2..209132c39 100644 --- a/polymer/eduke32/source/common_game.h +++ b/polymer/eduke32/source/common_game.h @@ -127,7 +127,12 @@ extern void G_LoadLookups(void); ////////// +#if defined HAVE_FLAC || defined HAVE_VORBIS +# define FORMAT_UPGRADE_ELIGIBLE extern int32_t S_OpenAudio(const char *fn, char searchfirst, uint8_t ismusic); +#else +# define S_OpenAudio(fn, searchfirst, ismusic) kopen4loadfrommod(fn, searchfirst) +#endif #ifdef __cplusplus } diff --git a/polymer/eduke32/source/jaudiolib/src/flac.c b/polymer/eduke32/source/jaudiolib/src/flac.c index dddf23f0a..4c577d70d 100644 --- a/polymer/eduke32/source/jaudiolib/src/flac.c +++ b/polymer/eduke32/source/jaudiolib/src/flac.c @@ -671,6 +671,17 @@ void MV_ReleaseFLACVoice(VoiceNode *voice) int32_t MV_PlayFLAC(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval) { + UNREFERENCED_PARAMETER(ptr); + UNREFERENCED_PARAMETER(ptrlength); + UNREFERENCED_PARAMETER(loopstart); + UNREFERENCED_PARAMETER(loopend); + UNREFERENCED_PARAMETER(pitchoffset); + UNREFERENCED_PARAMETER(vol); + UNREFERENCED_PARAMETER(left); + UNREFERENCED_PARAMETER(right); + UNREFERENCED_PARAMETER(priority); + UNREFERENCED_PARAMETER(callbackval); + MV_Printf("MV_PlayFLAC: FLAC support not included in this binary.\n"); return -1; } @@ -678,6 +689,15 @@ int32_t MV_PlayFLAC(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t lo int32_t MV_PlayFLAC3D(char *ptr, uint32_t ptrlength, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, uint32_t callbackval) { + UNREFERENCED_PARAMETER(ptr); + UNREFERENCED_PARAMETER(ptrlength); + UNREFERENCED_PARAMETER(loophow); + UNREFERENCED_PARAMETER(pitchoffset); + UNREFERENCED_PARAMETER(angle); + UNREFERENCED_PARAMETER(distance); + UNREFERENCED_PARAMETER(priority); + UNREFERENCED_PARAMETER(callbackval); + MV_Printf("MV_PlayFLAC: FLAC support not included in this binary.\n"); return -1; } diff --git a/polymer/eduke32/source/jaudiolib/src/vorbis.c b/polymer/eduke32/source/jaudiolib/src/vorbis.c index 68b615dae..ec71784c1 100644 --- a/polymer/eduke32/source/jaudiolib/src/vorbis.c +++ b/polymer/eduke32/source/jaudiolib/src/vorbis.c @@ -481,6 +481,17 @@ void MV_ReleaseVorbisVoice( VoiceNode * voice ) int32_t MV_PlayVorbis(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t loopend, int32_t pitchoffset, int32_t vol, int32_t left, int32_t right, int32_t priority, uint32_t callbackval) { + UNREFERENCED_PARAMETER(ptr); + UNREFERENCED_PARAMETER(ptrlength); + UNREFERENCED_PARAMETER(loopstart); + UNREFERENCED_PARAMETER(loopend); + UNREFERENCED_PARAMETER(pitchoffset); + UNREFERENCED_PARAMETER(vol); + UNREFERENCED_PARAMETER(left); + UNREFERENCED_PARAMETER(right); + UNREFERENCED_PARAMETER(priority); + UNREFERENCED_PARAMETER(callbackval); + MV_Printf("MV_PlayVorbis: OggVorbis support not included in this binary.\n"); return -1; } @@ -488,6 +499,15 @@ int32_t MV_PlayVorbis(char *ptr, uint32_t ptrlength, int32_t loopstart, int32_t int32_t MV_PlayVorbis3D(char *ptr, uint32_t ptrlength, int32_t loophow, int32_t pitchoffset, int32_t angle, int32_t distance, int32_t priority, uint32_t callbackval) { + UNREFERENCED_PARAMETER(ptr); + UNREFERENCED_PARAMETER(ptrlength); + UNREFERENCED_PARAMETER(loophow); + UNREFERENCED_PARAMETER(pitchoffset); + UNREFERENCED_PARAMETER(angle); + UNREFERENCED_PARAMETER(distance); + UNREFERENCED_PARAMETER(priority); + UNREFERENCED_PARAMETER(callbackval); + MV_Printf("MV_PlayVorbis: OggVorbis support not included in this binary.\n"); return -1; }