From 85e8f7762ec2075c303c451814cbf782b91f8287 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 19 Jul 2011 21:58:06 +0000 Subject: even more MIDI IO debugging git-svn-id: svn://localhost/ardour2/branches/3.0@9907 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/midi_diskstream.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'libs') diff --git a/libs/ardour/midi_diskstream.cc b/libs/ardour/midi_diskstream.cc index 214d25f690..8ccdd9420e 100644 --- a/libs/ardour/midi_diskstream.cc +++ b/libs/ardour/midi_diskstream.cc @@ -873,10 +873,6 @@ MidiDiskstream::do_flush (RunContext /*context*/, bool force_flush) total = _session.transport_frame() - _last_flush_frame; - if (_last_flush_frame > _session.transport_frame() || _last_flush_frame < capture_start_frame) { - _last_flush_frame = _session.transport_frame(); - } - if (total == 0 || _capture_buf->read_space() == 0 || (!force_flush && (total < disk_io_chunk_frames && was_recording))) { cerr << "\tFlush shortcut because total = " << total @@ -923,6 +919,14 @@ MidiDiskstream::do_flush (RunContext /*context*/, bool force_flush) } out: + + if (ret == 0) { + if (_last_flush_frame > _session.transport_frame() || _last_flush_frame < capture_start_frame) { + _last_flush_frame = _session.transport_frame(); + cerr << name() << " set last flush frame to " << _last_flush_frame << endl; + } + } + return ret; } -- cgit v1.2.3