Menu

LinuxSampler / News: Recent posts

Diagram: streaming samples from disk

Added a diagram that shows how LinuxSampler handles the streaming of samples from disk.

http://linuxsampler.sourceforge.net/images/diagram1.png

The sample data of each active voice is passed from the disk thread to the audio thread using lock-free ring buffers. This ensures that the audio thread never blocks and gives the disk thread enough time to refill the buffers associated to each voice.
The first part of each sample must be cached in RAM (not shown) in order to allow low latency sample triggering.
The MIDI sensor thread issues commands to the audio thread (voice start/stop commands) using an asynchronous (lock-free) queue.
In a similar way, the audio thread issues commands to the disk thread which start/stop the streaming of voices from disk.

Posted by Benno Senoner 2002-10-29