Preloading in bgt?

Hi,
So I've noticed in several of my games as I start to add more sounds, SoundPool begins to get very unhappy with me. Sounds will glitch all over the map, some things will sound awfully distorted, and I don't know the best way to fix this.
This is how I'm preloading right now but I don't think its working, and its beginning to annoy me. Anyways, take a look...
sound@[] preloaded_sounds;
pack_file sounds;
sound tmp;
void preloader()
{
string[] files=sounds.list_files();
for(uint s=0; s<files.length(); s++) {
tmp.load(files[s]);
preloaded_sounds.insert_last(tmp);
}
}
But whenever I put it in to the code, the game runs but I still recieve SoundPool issues. I've tried splitting sounds into several different SoundPool handles, but even that doesn't work.
Any help would be appreciated.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : tunmi13 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : kianoosh via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ashleygrobler04 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : tunmi13 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : CAE_Jones via Audiogames-reflector

Reply via email to