Game Development Community

Streaming, Looping music cause memory leak

by Wang Jinhui · in Torque 3D Professional · 09/16/2012 (9:05 pm) · 0 replies

I have a game which playing a looping, streaming background music. After the game is running for around 30 hours. The memory used can jump to 1.5G which eventually cause the computer to show virtual memory low message. I suspect after some times, the memory suddenly jump a lot. As during the initial a few hours, the memory used actually stay very constantly. This issue happened in both 1.1 Final and 1.2. Is there anybody also encountered this problem or anybody can give me some help how to debug this issue?
Below is how i play the music file:

singleton SFXDescription( AudioMaster );

singleton SFXSource( AudioChannelMaster )
{
description = AudioMaster;
};

singleton SFXSource( AudioChannelMusic )
{
description = AudioChannel;
};

singleton SFXDescription( AudioMusic )
{
volume = 1.0;
sourceGroup = AudioChannelMusic;
};

singleton SFXDescription( AudioMusicLoop2D : AudioMusic )
{
isLooping = true;
isStreaming = true;
};

function sound_PlayMusic(%tag)
{
%src = "/gui/audio/" @ %tag;
new SFXProfile(%tag)
{
description = AudioMusicLoop2D;
filename = %src;
};

sfxPlayOnce(%tag);
}

Appreciate any kinds of help and thank you in advanced

Best Regards,