Increasing sound cache limit

Greetings all!

It looks like I’ve exceeded my maximum sound cache limit in my most recent project. Several months ago, I learned of a config.prc directive that would increase the maximum size of the audio cache beyond its default of 15 sounds. Unfortunately, I didn’t have the forethought to write down the directive :frowning: Does anyone know what it is?

When I think about it, this question leads into two larger questions:

  1. Is there a way to look up the valid config.prc directives in general?

  2. What are the disadvantages to increasing the size of the audio cache?

Thank you for the help!

the congif option you’re looking for is:


where is the cache limit

you can list out all config file options with this fucntion:


  1. I’m not an expert on how panda handles it, but I’d imagine there would be more memory used.

Also, for future reference, there is a list of configuration variables available in the manual:

Excellent; thanks for the help!

As a side note, it doesn’t seem to work correctly if I put the command in my initializers at the top of my main code body (via this line):

loadPrcFileData("","audio-cache-limit 40")

Only if the command exists in Config.prc does it seem to adjust the audio cache limit appropriately. I would assume this is because it is an initialization step? Does anyone know of a way to finagle the module import sequence so that I could use the loadPrcFileData directive to add the module rule, or am I basically stuck with putting it in Config.prc? If possible, I’d like to roll this configuration option into the main code body, since it’s specific to this project.


what about this:


where is your limit.

Its also possible to create and add new audio managers to the base.sfxManagerList if you think your limit is getting too high.