# How to read audio files from memory?

**URL:** <https://forum.juce.com/t/how-to-read-audio-files-from-memory/13115>\
**Category:** General JUCE discussion\
**Created:** [July 4, 2014, 8:38am UTC](https://forum.juce.com/t/how-to-read-audio-files-from-memory/13115 "2014-07-04T08:38:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vicente\_Carrasco](https://avatars.discourse-cdn.com/v4/letter/v/c57346/32.png) [@Vicente\_Carrasco](https://forum.juce.com/u/Vicente_Carrasco)\
**Post date:** [July 4, 2014, 8:38am UTC](https://forum.juce.com/t/how-to-read-audio-files-from-memory/13115/1 "2014-07-04T08:38:22Z")

</div>

Hello friends!  
I want to read some audio files previously loaded into &nbsp;memory:

```
File sample0001 (String(appDirPath + appSubPath + "/sample0001.wav"));
 MemoryMappedFile mappedfile_sample001 (sample0001 , juce::MemoryMappedFile::readOnly);
```

But I don't know how to do it... can you help me?

Thanks in advance!  
&nbsp;

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [July 4, 2014, 8:59am UTC](https://forum.juce.com/t/how-to-read-audio-files-from-memory/13115/2 "2014-07-04T08:59:20Z")

</div>

There's already a class to do this: see WavAudioFormat::createMemoryMappedReader
