Posted: 06 Aug 2018, 14:26
Hello everybody,
is there a risk (or a consequence) if I call multiple times sdkSetEvtSize within the same call to onProcess() ?
I have a module that parse all incoming MIDI events and generates an array on output, but the size of the output array depends on what has been detected in the incoming MIDI stream (so I can't just count the number of MIDI messages and compute the related output size)
So what I do for now is :
- parse next MIDI event in the input array
- if it is a recognized MIDI event, I add two in the size of the output array
- and I add the computed data at last position of the newly computed
If there are three MIDI events on input when onProcess() is called, then I call sdkSetEvtSize three times. I am afraid that there is a kind of dynamic allocation, for which multiple calls would be problematic.
And second question (more for the Sensomusic team) : are arrays only limited to TColorUsine and TPrecision types, or can I also make arrays of ptBitwise ?
Thanks
Benoit
is there a risk (or a consequence) if I call multiple times sdkSetEvtSize within the same call to onProcess() ?
I have a module that parse all incoming MIDI events and generates an array on output, but the size of the output array depends on what has been detected in the incoming MIDI stream (so I can't just count the number of MIDI messages and compute the related output size)
So what I do for now is :
- parse next MIDI event in the input array
- if it is a recognized MIDI event, I add two in the size of the output array
- and I add the computed data at last position of the newly computed
If there are three MIDI events on input when onProcess() is called, then I call sdkSetEvtSize three times. I am afraid that there is a kind of dynamic allocation, for which multiple calls would be problematic.
And second question (more for the Sensomusic team) : are arrays only limited to TColorUsine and TPrecision types, or can I also make arrays of ptBitwise ?
Thanks
Benoit