I have problem with my audio plugin in Logic Pro X (don’t know what about other DAWs, I don’t have other DAW to test).
The problem is: when my plugin is inserted on some channel in Logic everything is OK, until I change buffor size in Logic. I mean change buffor size, when Logic project is still open. It’s possible in Logic at all. But with my plugin everything crash, whole Logic just disappear, and have info about unexpectedly finish logic.
I suppose the problem is because I have in my processBlock dynamic allocation of pointer. Something like that:
filteredImpulse = new float[buffer.getNumSamples()];
I make it because I need to have access from other class to whole buffer (actually to each value in the buffer array). As I hope buffer is dependent from Logic Pro buffer, so that is why I want to update the length of array that holds the buffer values. I don’t know how to do that, so that is my solution.
Of course I delete it later, but I do that in the deconstructor of AudioProcessor. So I am also not sure if it’s good area to delete allocated memory.
I am even not sure if that the problem. But the main problem is, my DAW crashes when I change the buffer size. But when I close the Logic project, change the buffer size, and open project again with my plugin, there is everything OK. Could anyone help me?
Thanks in advance