diff options
author | Carl Hetherington <carl@carlh.net> | 2011-02-06 18:32:22 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-02-06 18:32:22 +0000 |
commit | 674ed2430cae5e5d5e50eab854de642c9e4bd4fd (patch) | |
tree | 8ee36f9b29a233612525083b4020b5cfefd61ffb /libs | |
parent | e0f4bba2d5fda1fcc38d6fa50c3717c3d37e7ea5 (diff) |
Couple of asserts to catch similar bugs to #3755 a bit earlier.
git-svn-id: svn://localhost/ardour2/branches/3.0@8728 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/audio_diskstream.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc index 2ee824845a..8a161c3977 100644 --- a/libs/ardour/audio_diskstream.cc +++ b/libs/ardour/audio_diskstream.cc @@ -1167,6 +1167,8 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer) to_read = min (ts, len1); to_read = min (to_read, disk_io_chunk_frames); + assert (to_read >= 0); + if (to_read) { if (read (buf1, mixdown_buffer, gain_buffer, file_frame_tmp, to_read, chan, chan_n, reversed)) { @@ -1201,7 +1203,8 @@ AudioDiskstream::_do_refill (Sample* mixdown_buffer, float* gain_buffer) } file_frame = file_frame_tmp; - + assert (file_frame >= 0); + out: return ret; |