":audio(warning): 52 sounds cached. Limit is 40"

Sorry to drop two posts in one day, but it’s been a busy day!

We’re seeing the following warning, which we’ve seen before:

“:audio(warning): 52 sounds cached. Limit is 40”

I remember talking about the above warning awhile ago, and a bypass was provided to make it go away.

What I’m wondering now is: what does that warning mean? What practical effect will it have on engine performance if I exceed the sound cache limit? We have several tiny dialog snippets that play in sequence (and can then, essentially, be unloaded from the world, though I’m having difficulty kicking them out right now). So we’re never playing anything near 40 sounds simultaneously. And I’d like to keep our memory footprint as low as I can.

Is it alright to ignore that warning, or will we run into trouble? If we will run into trouble, how do I evict sounds from the cache? I’ve got a very specific, very evict-worthy set in mind :slight_smile:

Take care,

As far as I know, the cache limit is just a number to help prevent one from caching too many sounds at once (correct me if I am wrong about that). You can change the limit with the corresponding AudioManager call setCacheLimit() (using either base.musicManager or base.sfxManager). To uncache a sound just call uncacheSound on that audiomanager. For example:


I dont believe this deletes the sound, it just uncaches the sound from the audio pool. you will have to remove the sound in the normal python sense to have it leave memory.