mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
don't compile any vorbis code if it's unavailable
This commit is contained in:
parent
f287e78030
commit
725f1d0595
2 changed files with 4 additions and 18 deletions
|
@ -113,11 +113,13 @@ SND_Load (sfx_t *sfx)
|
|||
}
|
||||
Qread (file, buf, 4);
|
||||
Qseek (file, 0, SEEK_SET);
|
||||
#ifdef HAVE_VORBIS
|
||||
if (strnequal ("OggS", buf, 4)) {
|
||||
Sys_DPrintf ("SND_Load: ogg file\n");
|
||||
SND_LoadOgg (file, sfx, realname);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
if (strnequal ("RIFF", buf, 4)) {
|
||||
Sys_DPrintf ("SND_Load: wav file\n");
|
||||
SND_LoadWav (file, sfx, realname);
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
static __attribute__ ((unused)) const char rcsid[] =
|
||||
"$Id$";
|
||||
|
||||
#ifdef HAVE_VORBIS
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
# include "string.h"
|
||||
#endif
|
||||
|
@ -41,8 +43,6 @@ static __attribute__ ((unused)) const char rcsid[] =
|
|||
# include "strings.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VORBIS
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <vorbis/vorbisfile.h>
|
||||
|
||||
|
@ -279,20 +279,4 @@ SND_LoadOgg (QFile *file, sfx_t *sfx, char *realname)
|
|||
}
|
||||
}
|
||||
|
||||
#else//HAVE_VORBIS
|
||||
|
||||
#include "QF/sound.h"
|
||||
#include "QF/sys.h"
|
||||
#include "QF/quakeio.h"
|
||||
|
||||
#include "snd_render.h"
|
||||
|
||||
void
|
||||
SND_LoadOgg (QFile *file, sfx_t *sfx, char *realname)
|
||||
{
|
||||
Sys_Printf ("Ogg/Vorbis support not available, sorry.\n");
|
||||
Qclose (file);
|
||||
free (realname);
|
||||
return;
|
||||
}
|
||||
#endif//HAVE_VORBIS
|
||||
|
|
Loading…
Reference in a new issue