I am building a plugin that records short (1-3 second) audio clips, and uses that audio data for further processing. I would like for that audio to still be accessible in the plugin even after the DAW is restarted and the plugin is reopened. I have successfully saved the state of parameters using the getStateInformation() functions in the AudioProcessor and am considering trying to keep the audio data in this state as well. Does this sound like a bad idea?
The most reasonable alternative is to write the recordings to wav files, but I don’t love the idea of having external file dependencies. I also don’t want the user to have to worry about setting up these audio files. Any particular audio recording does not need to be used across different projects (to me, that would mean that saving them as WAVs would be the right thing to do). Has anyone faced this decision before?