hi everyone, Im new at audio programming, currently im in trying to build my first guitar distortion, and now I want to add a cabinet simulator to it, but my current problem is that every time I try to implement juce::dsp::convolution in my processorChain and load my IR wave file in a cabsim() function, it’s working properly on a standalone but it’s the cpu lag everytime I load the plugin in my fl studio, if anyone here experienced the same thing, pls let me know, thanks in advance, sorry for my english anyway
Long loading times of your plugin usually mean that executing the constructor or prepare routine of your processor takes a long time. I guess you are creating the convolution instance there, probably load your IR from somewhere etc. For longer audio files this might probably take some time, for cases like that loading the file can be executed on a background thread. However before we discuss possible solutions, we should find the actual problem. First step: Did you make sure that you compiled your plugin as a release build and not as a debug build? The speedup can be quite noticeable. If you did this, the next step is running your plugin under a profiler which can inspect which functions took how much time to execute. With the profiling results you get a much better idea which section of the code needs to be optimised.