SFXPlayOnce() not clearing buffers
by Kenneth Eves · in Torque Game Engine Advanced · 12/31/2010 (12:26 am) · 0 replies
Something I'm stuck on...
I'm using TGEA 1.7.1.
When playing a sound via SFXPlayOnce() in script the docs say the temporary profile and source are automatically deleted when no longer needed. Let's assume that they are. What I'm not sure about is the SFXBuffer that holds the sound for the source.
What I'm seeing is that the call triggers something (an allocation for the SFXBuffer, I assume) which grabs enough memory to hold the sound in 44100 16 bit stereo, the sound plays. My debugging outputs confirm that the source is deleted. But the memory (SFXBuffer (?)) is not being released.
On low memory systems, this is enough of a problem that the game eventually crashes.
I'm stuck because it looks like everything is working. I'm just not getting the big chunk of memory back.
Any thoughts?
NOTE: I am not using the Torque Memory Manager.
------------------------------------------------------
EDIT: http://docs.torquepowered.com/torque-3d/official/content/documentation/Engine/Audio/SFXInternals.html
I think this may be device related. I switched from FMod to DirectSound and had no improvement in the issue, so possible something in between Source delete and device is the issue.
I'm using TGEA 1.7.1.
When playing a sound via SFXPlayOnce() in script the docs say the temporary profile and source are automatically deleted when no longer needed. Let's assume that they are. What I'm not sure about is the SFXBuffer that holds the sound for the source.
What I'm seeing is that the call triggers something (an allocation for the SFXBuffer, I assume) which grabs enough memory to hold the sound in 44100 16 bit stereo, the sound plays. My debugging outputs confirm that the source is deleted. But the memory (SFXBuffer (?)) is not being released.
On low memory systems, this is enough of a problem that the game eventually crashes.
I'm stuck because it looks like everything is working. I'm just not getting the big chunk of memory back.
Any thoughts?
NOTE: I am not using the Torque Memory Manager.
------------------------------------------------------
EDIT: http://docs.torquepowered.com/torque-3d/official/content/documentation/Engine/Audio/SFXInternals.html
I think this may be device related. I switched from FMod to DirectSound and had no improvement in the issue, so possible something in between Source delete and device is the issue.
About the author
<3 TGE/A Quickly becoming a fan of T3D 1.2