#include "quakedef.h"
#include "cdaudio.h"
-#include "snd_main.h"
+#include "sound.h"
#define MAXTRACKS 256
// Try playing a fake track (sound file) first
sfx = S_PrecacheSound (va ("cdtracks/track%02u.wav", track), false, false);
- if (sfx == NULL || sfx->fetcher == NULL)
+ if (sfx == NULL || !S_IsSoundPrecached (sfx))
sfx = S_PrecacheSound (va ("cdtracks/track%03u.wav", track), false, false);
if (sfx != NULL)
{
return sfx;
}
+/*
+==================
+S_IsSoundPrecached
+==================
+*/
+qboolean S_IsSoundPrecached (const sfx_t *sfx)
+{
+ return (sfx != NULL && sfx->fetcher != NULL);
+}
+
/*
==================
S_LockSfx
return NULL;
}
+qboolean S_IsSoundPrecached (const sfx_t *sfx)
+{
+ return false;
+}
+
sfx_t *S_FindName (const char *name)
{
return NULL;
sfx_t *S_PrecacheSound (const char *sample, qboolean complain, qboolean lock);
void S_ServerSounds (char serversound [][MAX_QPATH], unsigned int numsounds);
+qboolean S_IsSoundPrecached (const sfx_t *sfx);
// S_StartSound returns the channel index, or -1 if an error occurred
int S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation);