mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 09:22:43 +00:00
fix the file handle leak
This commit is contained in:
parent
efe9dd844f
commit
194c9aa097
2 changed files with 3 additions and 3 deletions
|
@ -526,8 +526,8 @@ SND_UpdateAmbientSounds (void)
|
||||||
if (!ambient_sfx[ambient_channel]) {
|
if (!ambient_sfx[ambient_channel]) {
|
||||||
chan->sfx = 0;
|
chan->sfx = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
} else if (!chan->sfx)
|
||||||
chan->sfx = ambient_sfx[ambient_channel]->open (ambient_sfx[ambient_channel]);
|
chan->sfx = ambient_sfx[ambient_channel]->open (ambient_sfx[ambient_channel]);
|
||||||
|
|
||||||
vol = ambient_level->value * l->ambient_sound_level[ambient_channel];
|
vol = ambient_level->value * l->ambient_sound_level[ambient_channel];
|
||||||
if (vol < 8)
|
if (vol < 8)
|
||||||
|
|
|
@ -263,7 +263,7 @@ vorbis_stream_open (sfx_t *_sfx)
|
||||||
QFS_FOpenFile (stream->file, &file);
|
QFS_FOpenFile (stream->file, &file);
|
||||||
if (!file)
|
if (!file)
|
||||||
return 0;
|
return 0;
|
||||||
|
puts (stream->file);
|
||||||
sfx = calloc (1, sizeof (sfx_t));
|
sfx = calloc (1, sizeof (sfx_t));
|
||||||
samples = shm->speed * 0.3;
|
samples = shm->speed * 0.3;
|
||||||
size = samples = (samples + 255) & ~255;
|
size = samples = (samples + 255) & ~255;
|
||||||
|
|
Loading…
Reference in a new issue