13
0

MIDI IO debugging

git-svn-id: svn://localhost/ardour2/branches/3.0@9861 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-07-13 15:49:53 +00:00
parent 82ec615da3
commit f6a50adf42

View File

@ -864,6 +864,8 @@ MidiDiskstream::do_flush (RunContext /*context*/, bool force_flush)
int32_t ret = 0;
framecnt_t total;
cerr << name() << " flushing to disk\n";
_write_data_count = 0;
total = _session.transport_frame() - _last_flush_frame;
@ -874,6 +876,11 @@ MidiDiskstream::do_flush (RunContext /*context*/, bool force_flush)
if (total == 0 || _capture_buf->read_space() == 0
|| (!force_flush && (total < disk_io_chunk_frames && was_recording))) {
cerr << "\tFlush shortcut because total = " << total
<< " capture read space = " << _capture_buf->read_space()
<< " force flush = " << force_flush
<< " was recording = " << was_recording
<< endl;
goto out;
}
@ -905,6 +912,10 @@ MidiDiskstream::do_flush (RunContext /*context*/, bool force_flush)
} else {
_last_flush_frame = _session.transport_frame();
}
} else {
cerr << "\tdidn't write to disk because recenabled = " << record_enabled()
<< " last flush @ " << _last_flush_frame << " disk io " << disk_io_chunk_frames << " TF @ " << _session.transport_frame()
<< " force = " << force_flush << endl;
}
out: