move ownership of an RT MIDI buffer from DiskIO to MidiPlaylist
[ardour.git] / libs / ardour / ardour / note_fixer.h
index 69abc39df47663ebdb229a4cc44f48f50683f9ec..3e6fea6551f1a0cc88f41d5d68c8cbe029566cad 100644 (file)
@@ -1,21 +1,21 @@
 /*
-    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__
@@ -61,14 +61,16 @@ public:
         * 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.
@@ -80,7 +82,7 @@ public:
         */
        void emit(Evoral::EventSink<samplepos_t>& dst,
                  samplepos_t                     pos,
-                 MidiStateTracker&              tracker);
+                 MidiStateTracker&               tracker);
 
 private:
        typedef Evoral::Event<samplepos_t> Event;
@@ -91,7 +93,7 @@ private:
 
        /** 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;
@@ -99,6 +101,4 @@ private:
 
 } /* namespace ARDOUR */
 
-#endif /* __ardour_note_fixer_h__ */
-
-
+#endif /* __ardour_note_fixer_h__ */