Table of Contents

Disk Streaming

Goals: Load only a minimal amount of sample data from the disk on load, and then read in chunks just-in-time.
The following properties should be fulfilled:

Design

The samples are stored in multi-channel wav files, so we want to read in multiple channels at once in the loader thread since all channels are played (and therefore loaded) in parallel. Therefore the EventSample should be referencing the Sample object and not the AudioFile object alone…

FileLoader

Receives events/queries for chunk loading.

Request : (filename/ref, channelnumber, position [size from manager??])

If filename/ref and position is the same on consecutive requests, but the channel numbers are different, the requests are reads from the same multi-channel file and is to be collapsed into a single read with writes to multiple buffers.

Once a file is opened, it should stay opened as long as the sample is active.