add note IDs and use them for looking up notes during a history rebuild. NOTE: INVALIDATES OLDER HISTORY FILES

git-svn-id: svn://localhost/ardour2/branches/3.0@7449 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-07-20 16:27:34 +00:00
parent 3ef1a678b4
commit bf91ed99ec
24 changed files with 496 additions and 395 deletions

View file

@ -18,6 +18,7 @@
#include <iostream>
#include <limits>
#include <glib.h>
#include "evoral/Note.hpp"
namespace Evoral {
@ -25,8 +26,8 @@ namespace Evoral {
template<typename Time>
Note<Time>::Note(uint8_t chan, Time t, Time l, uint8_t n, uint8_t v)
// FIXME: types?
: _on_event(0xDE, t, 3, NULL, true)
, _off_event(0xAD, t + l, 3, NULL, true)
: _on_event (0xDE, t, 3, NULL, true)
, _off_event (0xAD, t + l, 3, NULL, true)
{
assert(chan < 16);
@ -49,9 +50,11 @@ Note<Time>::Note(uint8_t chan, Time t, Time l, uint8_t n, uint8_t v)
template<typename Time>
Note<Time>::Note(const Note<Time>& copy)
: _on_event(copy._on_event, true)
: _on_event(copy._on_event, true)
, _off_event(copy._off_event, true)
{
set_id (copy.id());
assert(_on_event.buffer());
assert(_off_event.buffer());
/*
@ -78,6 +81,13 @@ Note<Time>::~Note()
{
}
template<typename Time> void
Note<Time>::set_id (event_id_t id)
{
_on_event.set_id (id);
_off_event.set_id (id);
}
template<typename Time>
const Note<Time>&
Note<Time>::operator=(const Note<Time>& other)