Performance difference between AudioBuffer and MemoryMappedAudioSource


#1

Hello everyone,

the title says it all, essentially: Why use a MemoryMappedAudioSource over reading from a plain AudioBuffer for sample playback. I imagine the former to be of use for DFD-streaming, where you want to preload a chunk of sample data into RAM, and still work nicely with the other AudioReader classes.

Apart from that, is there any immediate benefit (performance wise) for using a MemoryMappedAudioSource?
Thank you,
Christoph


#2

There’s not really any point in using a MemoryMappedAudioSource unless you’re dealing with big files - it’s useful if you need to stream things, but for small blocks it’s generally less hassle (and will consume fewer OS handles) if you just pull it into an AudioBuffer.