[RESOLVED] Reading old (non-JUCE) AAX state data?

I’ve found ways to load old AU and VST3 data, but I’m having more problems with trying to read old (non-JUCE) AAX chunk data. I’ve got a way to read it if the chunk ID is not ‘juce’, but I still have a major problem.

When Pro Tools first loads a plug-in, it asks the plugin for chunk data, so that it can later initialize all plugin instances using that same data. However, the ID it uses is ‘elck’, not ‘juce’, so when GetChunk() is called to memorize the initial chunk data, it calls the default AAX_CEffectParameters::GetChunk(), which gives me data that is different from what my saved non-JUCE version writes. And then the subsequent call to SetChunk() sees the ‘elck’ ID, and assumes it is loading old non-JUCE chunk data, but instead it is loading that default chunk data.

Is there some way that I can recognize whether I need to load my old non-JUCE chunk data without using that chunk ID, or to know that the current call to SetChunk() is using the data from AAX_CEffectParameters::GetChunk() instead of loading old non-JUCE chunk data?

Ok, I see a way to do this. If I set the chunk size to 0 in GetChunkSize() when the ID is not ‘juce’, then no bad data will get read in to initialize the instances with. Seems to work for new instances, the first instance, and still allows me to read in the old chunk data from sessions I am loading.

1 Like

I also had to just return with AAX_SUCCESS from GetChunk() if the ID is not 'juce", to prevent an error trying to load 0 bytes, apparently.