Game Development Community

AlxGetWaveLen Problems

by Sebastien Bourgon · in Torque Game Engine · 03/16/2004 (2:23 am) · 0 replies

Hey guys,

This is more a notice of a problem we had with this function in Dark Horizons: Lore. I was using it to get the song length for playlist purposes (so I could schedule the play of the next song). Theres a nasty problem however, in that it figuratively ate ram at a large rate.
For the first time for one of the ogg files (although a .wav had similar results) it looked as if it stored it completely in memory, and each time after that, it would use up another meg of ram.
Lore's playlist had 6 songs, the memory usage on the MAIN menu (having read the length of all the songs before hand) would be 110 megs. Without that it was only 30 megs on my machine. This was a huge jump in RAM usage, and I just couldn't figure out what bit of code was causing it.

Since I couldn't fix it, I wrote a new one for oggs only that used the ogg library to get the time length. I'll probally resource the small console function later.(it is MGTs code and needs to be cleared with my bosses ;)

Although if anyones interested in fixing the problem (or even people who might have but never told anyone) well I'm sure everyone would appreciate it.

Sebastien

About the author

Former Indie Game Developer for Max Gaming Technologies. I then spent a couple years doing mobile work for Capcom Interactive Canada, the highlight being Mega Man II for iPhone. Now doing various mobile contract jobs (mostly iPhone)