summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_port.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
committerDavid Robillard <d@drobilla.net>2009-10-14 16:10:01 +0000
commitbb9cc45cd22af67ac275a5e73accbe14fee664d8 (patch)
treee52977d3eae6ff07b856088041a080a2fa3e5b79 /libs/ardour/midi_port.cc
parent8c4ce1e2ce35571aed5a686671431fdfffae7f8c (diff)
Strip trailing whitespace and fix other whitespace errors (e.g. space/tab mixing). Whitespace changes only.
Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_port.cc')
-rw-r--r--libs/ardour/midi_port.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/libs/ardour/midi_port.cc b/libs/ardour/midi_port.cc
index b07eb84f1b..880c1b5474 100644
--- a/libs/ardour/midi_port.cc
+++ b/libs/ardour/midi_port.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2006 Paul Davis
+ Copyright (C) 2006 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ MidiPort::cycle_start (nframes_t nframes)
{
_buffer->clear ();
assert (_buffer->size () == 0);
-
+
if (sends_output ()) {
jack_midi_clear_buffer (jack_port_get_buffer (_jack_port, nframes));
}
@@ -59,34 +59,34 @@ MidiPort::get_midi_buffer (nframes_t nframes, nframes_t offset)
void* jack_buffer = jack_port_get_buffer (_jack_port, nframes);
const nframes_t event_count = jack_midi_get_event_count(jack_buffer);
-
+
assert (event_count < _buffer->capacity());
/* suck all relevant MIDI events from the JACK MIDI port buffer
into our MidiBuffer
*/
-
+
nframes_t off = offset + _port_offset;
for (nframes_t i = 0; i < event_count; ++i) {
-
+
jack_midi_event_t ev;
jack_midi_event_get (&ev, jack_buffer, i);
-
+
if (ev.time > off && ev.time < off+nframes) {
_buffer->push_back (ev);
}
}
-
+
if (nframes) {
_has_been_mixed_down = true;
}
-
+
} else {
_buffer->silence (nframes);
}
-
+
if (nframes) {
_has_been_mixed_down = true;
}
@@ -94,7 +94,7 @@ MidiPort::get_midi_buffer (nframes_t nframes, nframes_t offset)
return *_buffer;
}
-
+
void
MidiPort::cycle_end (nframes_t /*nframes*/)
{
@@ -111,7 +111,7 @@ void
MidiPort::flush_buffers (nframes_t nframes, nframes_t offset)
{
if (sends_output ()) {
-
+
void* jack_buffer = jack_port_get_buffer (_jack_port, nframes);
for (MidiBuffer::iterator i = _buffer->begin(); i != _buffer->end(); ++i) {