Making a SamplerSound out of an AudioBuffer?

I’m making a sampler, and I want to store the sample as part of the plugin’s state in blob format. I’m currently using JUCE’s SamplerSound and Synthesizer to play back the samples, but SamplerSound takes in an AudioFormatReader rather than a blobbier format (such as AudioBuffer). Thus, I’m not sure what I should be doing after reloading the sound from the saved plugin state.

Is there any way to “convert” an AudioBuffer into an AudioFormatReader or somehow make a SamplerSound out of an AudioBuffer? I’ve scoured the docs but I can’t seem to find an easy/elegant way. Any help would be greatly appreciated! :slight_smile: