Writing a custom DSP that needs a pre-allocated buffer (one per output channel count). For example, if this custom DSP was attached to a 2 channel ChannelControl object, we would need to pre-allocate 2 buffers. 5.1, we would need to allocate 6 buffers.
It appears that you only get the create callback once, when the DSP is created. When you are trying to “attach” to a ChannelControl, there is no callback, or any allocation or setup you can do before the read callback is called.
Is there any way to do setup like this? It’s obviously unsafe to do in the audio thread. Is our only option creating/destroying the custom dsp so it calls “create” again?
I was looking for something like an “attach” or “detach” callback, but that doesn’t seem to exist.
Thanks for the help.