Sound settings in game.project (DEF-3134)


So I’m working with sound now and am getting
A sound could not be played since the sound buffer is full (32)
so I want to tweak those params in game.project. Now I’m confused about what is what.
I raised Max Sound Buffers to 64 but still getting the 32 error message!
Can someone please explain what all these params stands for.

Max Sound Data
Max Sound Buffers
Max Sound Sources
Max Sound Instances



It seems the number of sounds per collection is limited to 32 (in code)

As for what the params mean:

"Max Sound Data
Max number of sound resources, i.e the number of unique sound files at runtime, 128 by default.

Max Sound Instances
Max number of concurrent sound instances, i.e. actual sounds played at the same time. 256 by default.

Max Sound Buffers - not used

Max Sound Sources - not used

I.e you can have (with default settings) 128 unique sounds in the project, and max play 256 sound instances simultaneously in the project

I’ll add a ticket for making the per-collection sound component size configurable.



Thanks Mathias. Yeah, seems like 256 concurrent sound instances wont happen as you probably will have most sounds in one or two single collections (the actual game) and probably music on top of that in another global collection.
Don’t know about hardware limits for sounds when it comes to mobile but I sure hope it will take more than 32 as I am not even half way through sound implementation. (But yeah, some prio logic will probably be needed anyway)



We have some situation too:



The max sound buffers is currently not used.
The number 32 comes from a (currently hardcoded) max number of sound components one collection can have. We have ticket DEF-3134 for this, to add user configuration for this (and clean up the documentation/confusion)

Current workaround is to have several collections with the sound components in them

1 Like


Still the necessary workaround? To be clear, only 32 voices can still only play at once currently? Normally in other engines we would cycle through the available channels to play samples on and reserve a few for things like music.