Hi,
I have xml with converted to base64 audio files in it.
The main goal is to load audio to a synth.
As I understand I need to cast it to File or InputStream to create AudioFormatReader. If so, what is the best way to do it?
Thank you
Hi,
I have xml with converted to base64 audio files in it.
The main goal is to load audio to a synth.
As I understand I need to cast it to File or InputStream to create AudioFormatReader. If so, what is the best way to do it?
Thank you
I’ve done it like this:
MemoryOutputStream outStream;
bool result = juce::Base64::convertFromBase64(outStream, files[i]);
if(result)
{
std::unique_ptr<InputStream> inputStream;
inputStream.reset(new MemoryInputStream(outStream.getData(), outStream.getDataSize(), false));
auto* reader = formatManager.createReaderFor(std::move(inputStream));
it works. but is this good?
anyone?