mirror of https://github.com/OpenTTD/OpenTTD
(svn r2001) Resolve a race condition which could lead to dropped a sound and a memory leak
parent
f04780e66d
commit
39305c1a7c
2
mixer.c
2
mixer.c
|
@ -73,8 +73,8 @@ static void mix_int8_to_int16(MixerChannel *sc, int16 *buffer, uint samples)
|
||||||
static void MxCloseChannel(MixerChannel *mc)
|
static void MxCloseChannel(MixerChannel *mc)
|
||||||
{
|
{
|
||||||
if (mc->flags & MX_AUTOFREE) free(mc->memory);
|
if (mc->flags & MX_AUTOFREE) free(mc->memory);
|
||||||
mc->memory = NULL;
|
|
||||||
mc->active = false;
|
mc->active = false;
|
||||||
|
mc->memory = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MxMixSamples(Mixer *mx, void *buffer, uint samples)
|
void MxMixSamples(Mixer *mx, void *buffer, uint samples)
|
||||||
|
|
Loading…
Reference in New Issue