mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-29 20:20:43 +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);
|
Qread (file, buf, 4);
|
||||||
Qseek (file, 0, SEEK_SET);
|
Qseek (file, 0, SEEK_SET);
|
||||||
|
#ifdef HAVE_VORBIS
|
||||||
if (strnequal ("OggS", buf, 4)) {
|
if (strnequal ("OggS", buf, 4)) {
|
||||||
Sys_DPrintf ("SND_Load: ogg file\n");
|
Sys_DPrintf ("SND_Load: ogg file\n");
|
||||||
SND_LoadOgg (file, sfx, realname);
|
SND_LoadOgg (file, sfx, realname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (strnequal ("RIFF", buf, 4)) {
|
if (strnequal ("RIFF", buf, 4)) {
|
||||||
Sys_DPrintf ("SND_Load: wav file\n");
|
Sys_DPrintf ("SND_Load: wav file\n");
|
||||||
SND_LoadWav (file, sfx, realname);
|
SND_LoadWav (file, sfx, realname);
|
||||||
|
|
|
@ -34,6 +34,8 @@
|
||||||
static __attribute__ ((unused)) const char rcsid[] =
|
static __attribute__ ((unused)) const char rcsid[] =
|
||||||
"$Id$";
|
"$Id$";
|
||||||
|
|
||||||
|
#ifdef HAVE_VORBIS
|
||||||
|
|
||||||
#ifdef HAVE_STRING_H
|
#ifdef HAVE_STRING_H
|
||||||
# include "string.h"
|
# include "string.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -41,8 +43,6 @@ static __attribute__ ((unused)) const char rcsid[] =
|
||||||
# include "strings.h"
|
# include "strings.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_VORBIS
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <vorbis/vorbisfile.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
|
#endif//HAVE_VORBIS
|
||||||
|
|
Loading…
Reference in a new issue