diff options
author | David Robillard <d@drobilla.net> | 2009-10-14 16:10:01 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-14 16:10:01 +0000 |
commit | bb9cc45cd22af67ac275a5e73accbe14fee664d8 (patch) | |
tree | e52977d3eae6ff07b856088041a080a2fa3e5b79 /libs/ardour/midi_stretch.cc | |
parent | 8c4ce1e2ce35571aed5a686671431fdfffae7f8c (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_stretch.cc')
-rw-r--r-- | libs/ardour/midi_stretch.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libs/ardour/midi_stretch.cc b/libs/ardour/midi_stretch.cc index ea5ab62d02..9cd1321a12 100644 --- a/libs/ardour/midi_stretch.cc +++ b/libs/ardour/midi_stretch.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2008 Paul Davis + Copyright (C) 2008 Paul Davis Author: Dave Robillard This program is free software; you can redistribute it and/or modify @@ -54,9 +54,9 @@ MidiStretch::run (boost::shared_ptr<Region> r) /* the name doesn't need to be super-precise, but allow for 2 fractional digits just to disambiguate close but not identical stretches. */ - + snprintf (suffix, sizeof (suffix), "@%d", (int) floor (_request.time_fraction * 100.0f)); - + string new_name = region->name(); string::size_type at = new_name.find ('@'); @@ -67,15 +67,15 @@ MidiStretch::run (boost::shared_ptr<Region> r) } new_name += suffix; - + /* create new sources */ - + if (make_new_sources (region, nsrcs, suffix)) return -1; // FIXME: how to make a whole file region if it isn't? //assert(region->whole_file()); - + boost::shared_ptr<MidiSource> src = region->midi_source(0); src->load_model(); @@ -87,11 +87,11 @@ MidiStretch::run (boost::shared_ptr<Region> r) new_src->load_model(true, true); boost::shared_ptr<MidiModel> new_model = new_src->model(); new_model->start_write(); - + for (Evoral::Sequence<MidiModel::TimeType>::const_iterator i = old_model->begin(); i != old_model->end(); ++i) { const double new_time = i->time() * _request.time_fraction; - + // FIXME: double copy Evoral::Event<MidiModel::TimeType> ev(*i, true); ev.time() = new_time; @@ -100,9 +100,9 @@ MidiStretch::run (boost::shared_ptr<Region> r) new_model->end_write(); new_model->set_edited(true); - + const int ret = finish (region, nsrcs, new_name); - + results[0]->set_length((nframes_t) floor (r->length() * _request.time_fraction), NULL); return ret; |