Game Development Community

OGG streaming memory leaks

by Michael Cordner · in Torque Game Engine · 04/20/2006 (3:05 am) · 3 replies

Hello everyone,

I've actually posted this on the T2D forums, but it's really a torque core issue, so I've gone and bought the torque SDK to be able to access these forums. My team is at the very end of a T2D project, and is just integrating sound and music. We've come across this OGG streaming leak and it's a blocker P1 showstopper (whatever your project manager wants to call it,) and is preventing us from releasing.

Basically, and I've seen reference to this in other threads but can't find anything definitive) every call to alxPlay on a streaming ogg source is causing about 500k to be allocated and never freed. The game switches music many times throughout depending on what screen the player is on, and after a few screen changes, the memory usage starts to go through the roof.

As far as I know the latest version of T2D is using 1.4. Can anyone tell me if they've come across this or know about this issue?

Thanks

#1
04/20/2006 (6:22 am)
Our project uses fMod for streaming oggs in TGE;
at the very worst that might be an option for you.
#2
04/20/2006 (7:13 am)
I see no difference in looping 100 wav files than 100 ogg files, in my 1.4 build.
#3
04/21/2006 (3:30 am)
Could this be related? In audioblock.cc, I had to comment out the following lines

if(mDescriptionObject)
   {  // client side dataBlock id's are not in the dataBlock id range
      if (getId() >= DataBlockObjectIdFirst && getId() <= DataBlockObjectIdLast)
      {
         SimObjectId pid = mDescriptionObject->getId();
         if (pid < DataBlockObjectIdFirst || pid > DataBlockObjectIdLast)
         {
            //Con::errorf(ConsoleLogEntry::General,"AudioProfile: data dataBlock not networkable (use datablock to create).");
            //return false;
         }
      }
   }

If I leaven the 'return false' as is, the music doesn't play at all. Strange things are happening here.