How to read audio files from memory?


#1


Hello friends!
I want to read some audio files previously loaded into  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!
 


#2

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