/*
- Copyright (C) 2015 Paul Davis
- Author: David Robillard
-
- 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
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
+ * Copyright (C) 2017 Paul Davis <paul@linuxaudiosystems.com>
+ * Copyright (C) 2019 Robin Gareus <robin@gareus.org>
+ *
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
#ifndef __ardour_note_fixer_h__
#define __ardour_note_fixer_h__
* are enqueued to compensate for edits which should be later sent with
* emit() at the start of the next read.
*
+ * @param tempo_map The tempo-map
* @param cmd Command to compensate for.
* @param origin Timeline position of edited source.
* @param pos Current read position (last read end).
+ * @param active_notes currently active notes (read/write)
*/
void prepare(TempoMap& tempo_map,
const MidiModel::NoteDiffCommand* cmd,
- samplepos_t origin,
- samplepos_t pos,
+ samplepos_t origin,
+ samplepos_t pos,
std::set< boost::weak_ptr<Note> >& active_notes);
/** Emit any pending edit compensation events.
*/
void emit(Evoral::EventSink<samplepos_t>& dst,
samplepos_t pos,
- MidiStateTracker& tracker);
+ MidiStateTracker& tracker);
private:
typedef Evoral::Event<samplepos_t> Event;
/** Return true iff `note` is active at `pos`. */
bool note_is_active(const BeatsSamplesConverter& converter,
- boost::shared_ptr<Note> note,
+ boost::shared_ptr<Note> note,
samplepos_t pos);
Events _events;
} /* namespace ARDOUR */
-#endif /* __ardour_note_fixer_h__ */
-
-
+#endif /* __ardour_note_fixer_h__ */