Couple of asserts to catch similar bugs to #3755 a bit earlier.
authorCarl Hetherington <carl@carlh.net>
Sun, 6 Feb 2011 18:32:22 +0000 (18:32 +0000)
committerCarl Hetherington <carl@carlh.net>
Sun, 6 Feb 2011 18:32:22 +0000 (18:32 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@8728 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/audio_diskstream.cc

index 2ee824845aa320288caa99e68817f7443e0afc82..8a161c3977b2380b447066ed3c934c4b403b8419 100644 (file)
@@ -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;