I promise this is my last question!
I need to decide what to do until this weekend, so I’m asking now.
Let’s say I have an app that does these :
- Multiple (short) sounds keep being played randomly with random DSPs. (Think of gunshots on the battlefield)
- Maximally 1000 sounds can be triggered at the same time.
- Two DSPs (eg. distortion, flange) are added to each sound, and those two are all the DSPs in the app.
- But the number of the DSP variants (with different values dynamically determined) can be 1000 max.
So my question is :
A. Should I create appropriate DSPs at runtime and release them right after use or
B. Create all the possible DSPs in advance at startup and release them later when the app is closed?
As for the second one, I’m thinking of adding DSPs to the channel group instead of the channel.
So I need to create 1000 channel groups in advance for that as well.
But adding and removing DSPs are no more required in this case because each sound is played on the channel group with the right DSPs already added, whereas the first option requires adding and removing along with creating and releasing at runtime.
I think the first option requires more load time and memory but can perform better with lower latency and less battery power (which I’m more focused on).
Or, the combination of the two can be another option.
Like, creating only when a DSP with specific settings needed and keeping and reusing it until the app is closed.
What do you think?