summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/audio_diskstream.cc4
-rw-r--r--libs/ardour/diskstream.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index 1132b2a050..878fa94b5e 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -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) {
diff --git a/libs/ardour/diskstream.cc b/libs/ardour/diskstream.cc
index 9d5925322d..6501998171 100644
--- a/libs/ardour/diskstream.cc
+++ b/libs/ardour/diskstream.cc
@@ -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;