summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_port.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2019-11-06 08:56:50 -0700
committerPaul Davis <paul@linuxaudiosystems.com>2019-11-06 08:56:50 -0700
commit0bb34edec0408af43455528b51a91f760cabfbe0 (patch)
tree313bfb3c987bf97b9f45af50eb51863de582307f /libs/ardour/midi_port.cc
parent7d67789a3f407e154205e6a81232d43bd66fc7d0 (diff)
improve comment about warning message
Diffstat (limited to 'libs/ardour/midi_port.cc')
-rw-r--r--libs/ardour/midi_port.cc33
1 files changed, 21 insertions, 12 deletions
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc
index 2e0d8c2e44..57df97017f 100644
--- a/libs/ardour/midi_port.cc
+++ b/libs/ardour/midi_port.cc
@@ -127,20 +127,29 @@ MidiPort::get_midi_buffer (pframes_t nframes)
/* check that the event is in the acceptable time range */
if ((timestamp < (_global_port_buffer_offset)) ||
(timestamp >= (_global_port_buffer_offset + nframes))) {
- /* XXX this is normal after a split cycles XXX
- * The engine buffer contains the data for the complete cycle, but
- * only the part after _global_port_buffer_offset is needed. */
+ /* This is normal after a split cycles.
+ *
+ * The engine buffer contains the data for the
+ * complete cycle, but only the part after
+ * _global_port_buffer_offset is needed.
+ *
+ * But of course ... if
+ * _global_port_buffer_offset is zero,
+ * something wierd is happening.
+ */
#ifndef NDEBUG
- cerr << "Ignored incoming MIDI at time " << timestamp << "; offset="
- << _global_port_buffer_offset << " limit="
- << (_global_port_buffer_offset + nframes)
- << " = (" << _global_port_buffer_offset
- << " + " << nframes
- << ")";
- for (size_t xx = 0; xx < size; ++xx) {
- cerr << ' ' << hex << (int) buf[xx];
+ if (_global_port_buffer_offset == 0) {
+ cerr << "Ignored incoming MIDI at time " << timestamp << "; offset="
+ << _global_port_buffer_offset << " limit="
+ << (_global_port_buffer_offset + nframes)
+ << " = (" << _global_port_buffer_offset
+ << " + " << nframes
+ << ")";
+ for (size_t xx = 0; xx < size; ++xx) {
+ cerr << ' ' << hex << (int) buf[xx];
+ }
+ cerr << dec << endl;
}
- cerr << dec << endl;
#endif
continue;
}