mirror of
https://github.com/UberGames/rpgxEF.git
synced 2025-04-22 08:50:48 +00:00
Fixed mp3 sound
This commit is contained in:
parent
c2b5d43bfe
commit
d7c59c1a21
1 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
// Q3 MP3 codec
|
||||
snd_codec_t mp3_codec =
|
||||
{
|
||||
".mp3",
|
||||
"mp3",
|
||||
S_MP3_CodecLoad,
|
||||
S_MP3_CodecOpenStream,
|
||||
S_MP3_CodecReadStream,
|
||||
|
@ -692,7 +692,7 @@ void *S_MP3_CodecLoad(const char *filename, snd_info_t *info)
|
|||
info->dataofs = stream->info.dataofs;
|
||||
|
||||
// allocate enough buffer for all pcm data
|
||||
pcmbuffer = Z_Malloc(stream->info.size);
|
||||
pcmbuffer = Hunk_AllocateTempMemory(stream->info.size);
|
||||
if(!pcmbuffer)
|
||||
{
|
||||
S_MP3_CodecCloseStream(stream);
|
||||
|
@ -704,7 +704,7 @@ void *S_MP3_CodecLoad(const char *filename, snd_info_t *info)
|
|||
if(info->size <= 0)
|
||||
{
|
||||
// we didn't read anything at all. darn.
|
||||
Z_Free(pcmbuffer);
|
||||
Hunk_FreeTempMemory(pcmbuffer);
|
||||
pcmbuffer = NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue