# Getting Base64 into an AudioBuffer

**URL:** <https://forum.juce.com/t/getting-base64-into-an-audiobuffer/63725>\
**Category:** General JUCE discussion\
**Created:** [October 5, 2024, 11:40am UTC](https://forum.juce.com/t/getting-base64-into-an-audiobuffer/63725 "2024-10-05T11:40:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CristianVogel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/cristianvogel/32/6253_2.png) [@CristianVogel](https://forum.juce.com/u/CristianVogel)\
**Post date:** [October 5, 2024, 11:40am UTC](https://forum.juce.com/t/getting-base64-into-an-audiobuffer/63725/1 "2024-10-05T11:40:02Z")

</div>

Hello.

I couldn’t see an go-to method for doing this. Is this the way to do it?

```auto
   auto buffer = juce::AudioBuffer<float>();
    juce::MemoryOutputStream decodedStream;
    juce::Base64::convertFromBase64 (decodedStream, base64Data);
    auto reader = formatManager.createReaderFor(new juce::MemoryInputStream(decodedStream.getData(), decodedStream.getDataSize(), false));

```

Should I be serving just the Base64 data , or is it better to pass a URI encoded string, with MIME type then the data?
