From 1b5cac563b62e10062ed3df78f006d3f6d211d54 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Tue, 29 Apr 2008 23:42:28 -0500 Subject: [PATCH] Make extra disk buffering optional. --- Timeline/Disk_Stream.C | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Timeline/Disk_Stream.C b/Timeline/Disk_Stream.C index 005e92f..e9740ae 100644 --- a/Timeline/Disk_Stream.C +++ b/Timeline/Disk_Stream.C @@ -68,9 +68,10 @@ Disk_Stream::Disk_Stream ( Track *th, float frame_rate, nframes_t nframes, int c size_t bufsize = _total_blocks * nframes * sizeof( sample_t ); - _disk_io_blocks = ( bufsize * channels ) / ( disk_io_kbytes * 1024 ); - - assert( _disk_io_blocks ); + if ( disk_io_kbytes ) + _disk_io_blocks = ( bufsize * channels ) / ( disk_io_kbytes * 1024 ); + else + _disk_io_blocks = 1; for ( int i = channels; i--; ) _rb.push_back( jack_ringbuffer_create( bufsize ) );