Fix default disk_io_chunk_frames for diskstream so that it

isn't larger than the default playback buffer size when
starting Ardour without a previous ~/.config; having
disk_io_chunk_frames larger violates basic design
assumptions and causes phantom underruns in playback
(#4308).


git-svn-id: svn://localhost/ardour2/branches/3.0@10079 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington
2011-09-14 15:55:27 +00:00
parent f4f5706265
commit 8f5dd22c51
2 changed files with 5 additions and 1 deletions

View File

@@ -1021,6 +1021,10 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer)
at higher speeds, just do it because the sync between butler
and audio thread may not be good enough.
Note: it is a design assumption that disk_io_chunk_frames is smaller
than the playback buffer size, so this check should never trip when
the playback buffer is empty.
*/
if ((total_space < disk_io_chunk_frames) && fabs (_actual_speed) < 2.0f) {

View File

@@ -70,7 +70,7 @@ using namespace PBD;
* default from configuration_vars.h). 0 is not a good value for
* allocating buffer sizes..
*/
ARDOUR::framecnt_t Diskstream::disk_io_chunk_frames = 1024 * 256;
ARDOUR::framecnt_t Diskstream::disk_io_chunk_frames = 1024 * 256 / sizeof (Sample);
PBD::Signal0<void> Diskstream::DiskOverrun;
PBD::Signal0<void> Diskstream::DiskUnderrun;