ARA managing buffers for offline processing

hello i’m working on a plugin using ARA and had some questions about how to deal with offline processing of audio. currently, i’m still using the ARAPluginDemo as a starting point, and I’m wondering if anyone has thoughts on how to improve the architecture of my plugin.

currently when the plugin is loaded onto a track it will take each region in the track and perform some processing to the region, upon creation of the plugin. I achieve this by performing the processing on the audio in the constructor of ARADemoPluginAudioModification, and storing a copy of the audio buffer in this class in a juce::AudioBuffer<float>* memeber.

the issue is that store an entire copy of the buffer is expensive, and by creating a copy like this It’s difficult to utilize other parts of code since we expect to receive AudioSource like objects when dealing with audio.

I’m wondering if there’s a more space efficient way to perform offline processing and save the result?

and if not is there a way to communicate the change to the original audio buffer rather than having to store a copy of it?

Hey buddy , did you find any other way here?