mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
fix the "Cache_Release: already released!" error
This commit is contained in:
parent
81a57bb3fa
commit
4ccb6675a6
1 changed files with 9 additions and 3 deletions
|
@ -44,6 +44,7 @@ static __attribute__ ((used)) const char rcsid[] =
|
||||||
#include "QF/cvar.h"
|
#include "QF/cvar.h"
|
||||||
#include "QF/dstring.h"
|
#include "QF/dstring.h"
|
||||||
#include "QF/model.h"
|
#include "QF/model.h"
|
||||||
|
#include "QF/quakefs.h"
|
||||||
#include "QF/sys.h"
|
#include "QF/sys.h"
|
||||||
|
|
||||||
#include "snd_render.h"
|
#include "snd_render.h"
|
||||||
|
@ -247,6 +248,13 @@ s_playvol_f (void)
|
||||||
dstring_delete (name);
|
dstring_delete (name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
s_channels_gamedir (void)
|
||||||
|
{
|
||||||
|
ambient_sfx[AMBIENT_WATER] = SND_PrecacheSound ("ambience/water1.wav");
|
||||||
|
ambient_sfx[AMBIENT_SKY] = SND_PrecacheSound ("ambience/wind2.wav");
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
SND_Channels_Init (void)
|
SND_Channels_Init (void)
|
||||||
{
|
{
|
||||||
|
@ -279,8 +287,7 @@ SND_Channels_Init (void)
|
||||||
|
|
||||||
snd_num_statics = 0;
|
snd_num_statics = 0;
|
||||||
|
|
||||||
ambient_sfx[AMBIENT_WATER] = SND_PrecacheSound ("ambience/water1.wav");
|
QFS_GamedirCallback (s_channels_gamedir);
|
||||||
ambient_sfx[AMBIENT_SKY] = SND_PrecacheSound ("ambience/wind2.wav");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static channel_t *
|
static channel_t *
|
||||||
|
@ -386,7 +393,6 @@ s_updateAmbientSounds (void)
|
||||||
sfx->retain (sfx);
|
sfx->retain (sfx);
|
||||||
} else {
|
} else {
|
||||||
sfx = chan->sfx;
|
sfx = chan->sfx;
|
||||||
sfx->retain (sfx);//FIXME why is this needed?
|
|
||||||
}
|
}
|
||||||
// sfx will be written to chan->sfx later to ensure mixer doesn't use
|
// sfx will be written to chan->sfx later to ensure mixer doesn't use
|
||||||
// channel prematurely.
|
// channel prematurely.
|
||||||
|
|
Loading…
Reference in a new issue