diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index d8f2ba9d74..dc9f427e87 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -618,7 +618,7 @@ AudioDiskstream::process (framepos_t transport_frame, pframes_t nframes, framecn as our current_playback_buffer. */ - assert(wrap_buffer_size >= chaninfo->playback_vector.len[0] + chaninfo->playback_vector.len[1]); + assert(wrap_buffer_size >= necessary_samples); /* Copy buf[0] from playback_buf */ memcpy ((char *) chaninfo->playback_wrap_buffer, @@ -1954,7 +1954,7 @@ AudioDiskstream::allocate_temporary_buffers () */ double const sp = max (fabsf (_actual_speed), 1.2f); - framecnt_t required_wrap_size = (framecnt_t) floor (_session.get_block_size() * sp) + 1; + framecnt_t required_wrap_size = (framecnt_t) ceil (_session.get_block_size() * sp) + 2; if (required_wrap_size > wrap_buffer_size) {