mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
Use plain malloc instead of Z_Malloc to allocate sound buffers in mixer_sound.c's I_GetSfx.
This should prevent I_FreeSfx making a mess of things later, hopefully.
This commit is contained in:
parent
8e19611033
commit
6b1fa399dc
1 changed files with 3 additions and 3 deletions
|
@ -176,7 +176,7 @@ static Mix_Chunk *ds2chunk(void *stream)
|
|||
return NULL; // would and/or did wrap, can't store.
|
||||
break;
|
||||
}
|
||||
sound = Z_Malloc(newsamples<<2, PU_SOUND, NULL); // samples * frequency shift * bytes per sample * channels
|
||||
sound = malloc(newsamples<<2); // samples * frequency shift * bytes per sample * channels
|
||||
|
||||
s = (SINT8 *)stream;
|
||||
d = (INT16 *)sound;
|
||||
|
@ -304,7 +304,7 @@ void *I_GetSfx(sfxinfo_t *sfx)
|
|||
gme_track_info(emu, &info, 0);
|
||||
|
||||
len = (info->play_length * 441 / 10) << 2;
|
||||
mem = Z_Malloc(len, PU_SOUND, NULL);
|
||||
mem = malloc(len);
|
||||
gme_play(emu, len >> 1, mem);
|
||||
gme_delete(emu);
|
||||
|
||||
|
@ -376,7 +376,7 @@ void *I_GetSfx(sfxinfo_t *sfx)
|
|||
gme_track_info(emu, &info, 0);
|
||||
|
||||
len = (info->play_length * 441 / 10) << 2;
|
||||
mem = Z_Malloc(len, PU_SOUND, NULL);
|
||||
mem = malloc(len);
|
||||
gme_play(emu, len >> 1, mem);
|
||||
gme_delete(emu);
|
||||
|
||||
|
|
Loading…
Reference in a new issue