debug instrumentation for locate time
[ardour.git] / libs / ardour / disk_reader.cc
index 4c4b8df51ac80a99fef152088751bdfcaa236d1e..918761e5371cb6812a3456d256bca5d838f7fc88 100644 (file)
@@ -112,7 +112,7 @@ DiskReader::default_chunk_frames()
 bool
 DiskReader::set_name (string const & str)
 {
-       string my_name = X_("reader:");
+       string my_name = X_("playback:");
        my_name += str;
 
        if (_name != my_name) {
@@ -277,14 +277,16 @@ DiskReader::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame,
        }
 
        BufferSet& scratch_bufs (_session.get_scratch_buffers (bufs.count()));
-       const bool still_locating = _session.locate_pending();
+       const bool still_locating = _session.global_locate_pending();
 
        if (!result_required || ((ms & MonitoringDisk) == 0) || still_locating) {
 
                /* no need for actual disk data, just advance read pointer and return */
 
-               for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
-                       (*chan)->buf->increment_read_ptr (playback_distance);
+               if (!still_locating) {
+                       for (ChannelList::iterator chan = c->begin(); chan != c->end(); ++chan) {
+                               (*chan)->buf->increment_read_ptr (playback_distance);
+                       }
                }
 
                /* if monitoring disk but locating, put silence in the buffers */
@@ -470,7 +472,7 @@ DiskReader::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame,
                }
        }
 
-       DEBUG_TRACE (DEBUG::Butler, string_compose ("%1 reader run, needs butler = %2\n", name(), _need_butler));
+       // DEBUG_TRACE (DEBUG::Butler, string_compose ("%1 reader run, needs butler = %2\n", name(), _need_butler));
 }
 
 void
@@ -1077,7 +1079,7 @@ DiskReader::refill_audio (Sample* mixdown_buffer, float* gain_buffer, framecnt_t
        }
 
        // elapsed = g_get_monotonic_time () - before;
-       // cerr << "\tbandwidth = " << (byte_size_for_read / 1048576.0) / (elapsed/1000000.0) << "MB/sec\n";
+       // cerr << '\t' << name() << ": bandwidth = " << (byte_size_for_read / 1048576.0) / (elapsed/1000000.0) << "MB/sec\n";
 
        file_frame = file_frame_tmp;
        assert (file_frame >= 0);