I have to load the sound effects for a level of a game. There are lots of sound files, let’s say 100, maybe more.
I know i can increase the audio-cache-limit variable and load all of them (in a loading stage/screen) in the same audiomanager. I suppose Panda will use more memory but i want to know if it is a common solution or is there a better practice.
Thanks for your help!
You don’t need to change the audio-cache-limit; this is just a tuning parameter. Panda will generally do the right thing automatically. Just load up all 100 sounds and play them when you’re ready.
A couple more question about this.
In a case like this, when i opened so many audio files, i have to close those files when i don’t need them any more (calling some method)? or just eliminate any reference to those files? i mean, to free resourses.
It is a good practice to load all the sounds (base.loader.loadSfx() or music) in a loading stage or load and play when you need the sound? to avoid delays. I don’t know if the sounds are streamed.