On Wed, Sep 9, 2009 at 11:45 PM, James Cameron <quozl(a)us.netrek.org> wrote:
Yes, the ideal is that the tracks being played are
cached in RAM so that
no disk access is required. The recording track would be creating a
file that would be periodically written to disk.
this is not the ideal. its how any serious recording application has
to work. Linux filesystems can stall a thread for seconds while doing
disk i/o. you cannot do disk i/o from the thread that handles incoming
audio unless you already buffered like crazy.
ardour has a buffer of about 5 seconds, per channel, per direction
(its user configurable). both playback and recording occurs via these
buffers. ardour also tries to read/write in blocks of 256kB, since at
one point we empirically determined that this maximized disk
throughput in many cases. in an ideal world, we'd probably use O_RAW
for file i/o, and thus bypass the duplicated buffering of the kernel
FS buffer cache. but for now, that extra layer of buffering serves us
quite well (especially for read-ahead), and so we don't bother with
that.