In a previous post I inquired about various getStateInformation / setStateInformation specifics.
Here I specifically want to inquire about saving and retrieving an array (stream) of raw float data. As I previously discussed I store my 100% customizable wavetables in the DAW project file and preset via getStateInformation/setStateInformation. Until now I used a precision reduction and XML string method, but want to explore other options.
I noted that I can append my entire array the following way in getStateInformation;
void MutineerAudioProcessor::getStateInformation (MemoryBlock & destData)
{
auto s = parameters.copyState ();
std::unique_ptr<juce::XmlElement> xml (s.createXml ());
.. Here all my "normal" non automation parameters are saved
// Here the XML is written
copyXmlToBinary (*xml, destData);
// And here I write my 8 tone generator wavetables, each 2048 in size
destData.append (synthParams.tgActiveWaveform, 8 * wtSize * sizeof (float));
}
With the above append I can see my DAW file increases when I save my project,
and my question is how do I retrieve this data in setStateInformation.
I tried in vain to use MemoryInputStream.