summaryrefslogtreecommitdiff
path: root/libs/ardour/audio_diskstream.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-12-09 16:36:37 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-12-09 16:36:52 -0500
commit1e0c1751a53999a8b9ac6978393486afbf317529 (patch)
tree54932ad7570f01010a34123873359fc4e06524fd /libs/ardour/audio_diskstream.cc
parent8e931398720357a74cdc12c56dd8225380f13ccb (diff)
more DEBUG::Butler output, formatting corrections, and a warning on cerr if capture/playback buffers are too full/empty
Diffstat (limited to 'libs/ardour/audio_diskstream.cc')
-rw-r--r--libs/ardour/audio_diskstream.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/audio_diskstream.cc b/libs/ardour/audio_diskstream.cc
index fefc1c235c..538faebc4f 100644
--- a/libs/ardour/audio_diskstream.cc
+++ b/libs/ardour/audio_diskstream.cc
@@ -513,6 +513,8 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
framecnt_t total = chaninfo->capture_vector.len[0] + chaninfo->capture_vector.len[1];
if (rec_nframes > total) {
+ DEBUG_TRACE (DEBUG::Butler, string_compose ("%1 overrun in %2, rec_nframes = %3 total space = %4\n",
+ pthread_self(), name(), rec_nframes, total));
DiskOverrun ();
return -1;
}
@@ -619,6 +621,8 @@ AudioDiskstream::process (BufferSet& bufs, framepos_t transport_frame, pframes_t
if (necessary_samples > total) {
cerr << _name << " Need " << necessary_samples << " total = " << total << endl;
cerr << "underrun for " << _name << endl;
+ DEBUG_TRACE (DEBUG::Butler, string_compose ("%1 underrun in %2, rec_nframes = %3 total space = %4\n",
+ pthread_self(), name(), rec_nframes, total));
DiskUnderrun ();
return -1;
@@ -1394,7 +1398,7 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush)
error << string_compose(_("AudioDiskstream %1: cannot write to disk"), id()) << endmsg;
return -1;
}
-
+
(*chan)->capture_buf->increment_read_ptr (to_write);
(*chan)->curr_capture_cnt += to_write;
@@ -1407,6 +1411,8 @@ AudioDiskstream::do_flush (RunContext /*context*/, bool force_flush)
to_write = min ((framecnt_t)(disk_io_chunk_frames - to_write), (framecnt_t) vector.len[1]);
+ DEBUG_TRACE (DEBUG::Butler, string_compose ("%1 additional write of %2\n", name(), to_write));
+
if ((*chan)->write_source->write (vector.buf[1], to_write) != to_write) {
error << string_compose(_("AudioDiskstream %1: cannot write to disk"), id()) << endmsg;
return -1;