summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_region.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_region.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_region.cc')
-rw-r--r--libs/ardour/midi_region.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc
index aca8d039ad..87c7d656e7 100644
--- a/libs/ardour/midi_region.cc
+++ b/libs/ardour/midi_region.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2000-2006 Paul Davis
+ Copyright (C) 2000-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
@@ -123,7 +123,7 @@ MidiRegion::set_position_internal (nframes_t pos, bool allow_bbt_recompute)
double length_beats = old_converter.from(_length);
Region::set_position_internal(pos, allow_bbt_recompute);
-
+
BeatsFramesConverter new_converter(_session, pos - _start);
set_length(new_converter.to(length_beats), 0);
@@ -151,7 +151,7 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, MidiRingBuffer<nframes_t>& dst
/* precondition: caller has verified that we cover the desired section */
assert(chan_n == 0);
-
+
if (position < _position) {
internal_offset = 0;
src_offset = _position - position;
@@ -164,7 +164,7 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, MidiRingBuffer<nframes_t>& dst
if (internal_offset >= _length) {
return 0; /* read nothing */
}
-
+
if ((to_read = min (dur, _length - internal_offset)) == 0) {
return 0; /* read nothing */
}
@@ -189,15 +189,15 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, MidiRingBuffer<nframes_t>& dst
} else {
// when _start is greater than _position, we have to subtract
// _start from the note times in the midi source
- negative_output_buffer_position = _start;
+ negative_output_buffer_position = _start;
}
-#if 0
+#if 0
cerr << "\t\tsource read from " << _position << " - " << _start << " (" << _position - _start << ") "
<< " start in source " << _start << " + " << internal_offset << " (" << _start + internal_offset << ") "
- << " dur = " << to_read
- << " offset = " << output_buffer_position
- << " negoffset = " << negative_output_buffer_position
+ << " dur = " << to_read
+ << " offset = " << output_buffer_position
+ << " negoffset = " << negative_output_buffer_position
<< endl;
#endif
@@ -216,7 +216,7 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, MidiRingBuffer<nframes_t>& dst
return to_read;
}
-
+
XMLNode&
MidiRegion::state (bool full)
{
@@ -224,11 +224,11 @@ MidiRegion::state (bool full)
char buf[64];
char buf2[64];
LocaleGuard lg (X_("POSIX"));
-
+
node.add_property ("flags", enum_2_string (_flags));
// XXX these should move into Region
-
+
for (uint32_t n=0; n < _sources.size(); ++n) {
snprintf (buf2, sizeof(buf2), "source-%d", n);
_sources[n]->id().print (buf, sizeof(buf));
@@ -257,7 +257,7 @@ MidiRegion::set_live_state (const XMLNode& node, Change& what_changed, bool send
Region::set_live_state (node, what_changed, false);
uint32_t old_flags = _flags;
-
+
if ((prop = node.property ("flags")) != 0) {
_flags = Flag (string_2_enum (prop->value(), _flags));
@@ -302,7 +302,7 @@ MidiRegion::recompute_at_end ()
* (non destructively) "chop" notes that pass the end boundary, to
* prevent stuck notes.
*/
-}
+}
void
MidiRegion::recompute_at_start ()