From a473d630eb165272992e90f8d854b1d66ec0be63 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 1 Jun 2011 16:50:12 +0000 Subject: Fix broken whitespace. I'd apologize for the compile times if it was my fault :D git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/midi_port.cc | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'libs/ardour/midi_port.cc') diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc index 77fe712c5c..a8bff5bfa7 100644 --- a/libs/ardour/midi_port.cc +++ b/libs/ardour/midi_port.cc @@ -84,12 +84,12 @@ MidiPort::get_midi_buffer (pframes_t nframes) /* check that the event is in the acceptable time range */ - if ((ev.time >= (_global_port_buffer_offset + _port_buffer_offset)) && + if ((ev.time >= (_global_port_buffer_offset + _port_buffer_offset)) && (ev.time < (_global_port_buffer_offset + _port_buffer_offset + nframes))) { _buffer->push_back (ev); } else { - cerr << "Dropping incoming MIDI at time " << ev.time << "; offset=" - << _global_port_buffer_offset << " limit=" + cerr << "Dropping incoming MIDI at time " << ev.time << "; offset=" + << _global_port_buffer_offset << " limit=" << (_global_port_buffer_offset + _port_buffer_offset + nframes) << "\n"; } } @@ -122,28 +122,28 @@ void MidiPort::resolve_notes (void* jack_buffer, MidiBuffer::TimeType when) { uint8_t ev[3]; - + ev[2] = 0; - + for (uint8_t channel = 0; channel <= 0xF; channel++) { ev[0] = (MIDI_CMD_CONTROL | channel); - + /* we need to send all notes off AND turn the * sustain/damper pedal off to handle synths * that prioritize sustain over AllNotesOff */ - + ev[1] = MIDI_CTL_SUSTAIN; - + if (jack_midi_event_write (jack_buffer, when, ev, 3) != 0) { cerr << "failed to deliver sustain-zero on channel " << channel << " on port " << name() << endl; - } - + } + ev[1] = MIDI_CTL_ALL_NOTES_OFF; - + if (jack_midi_event_write (jack_buffer, 0, ev, 3) != 0) { cerr << "failed to deliver ALL NOTES OFF on channel " << channel << " on port " << name() << endl; - } + } } } @@ -175,11 +175,11 @@ MidiPort::flush_buffers (pframes_t nframes, framepos_t time) if (ev.time() >= _global_port_buffer_offset + _port_buffer_offset) { if (jack_midi_event_write (jack_buffer, (jack_nframes_t) ev.time(), ev.buffer(), ev.size()) != 0) { - cerr << "write failed, drop flushed note off on the floor, time " + cerr << "write failed, drop flushed note off on the floor, time " << ev.time() << " > " << _global_port_buffer_offset + _port_buffer_offset << endl; } } else { - cerr << "drop flushed event on the floor, time " << ev.time() + cerr << "drop flushed event on the floor, time " << ev.time() << " < " << _global_port_buffer_offset + _port_buffer_offset << endl; } } -- cgit v1.2.3