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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user