X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fevoral%2Fevoral%2FSequence.hpp;h=df8c48a1b6047d5567224de7e5b9ddf5e1ea262e;hb=fa4e858eb351668bc6687819903d019703daef7a;hp=450051b2464ab6c654e9aaf4b68fcf7fe60674db;hpb=c5aa71782890fc652531f89f8676cdcc99fa8f53;p=ardour.git diff --git a/libs/evoral/evoral/Sequence.hpp b/libs/evoral/evoral/Sequence.hpp index 450051b246..df8c48a1b6 100644 --- a/libs/evoral/evoral/Sequence.hpp +++ b/libs/evoral/evoral/Sequence.hpp @@ -35,9 +35,9 @@ namespace Evoral { class TypeMap; -class EventSink; -class Note; -class Event; +template class EventSink; +template class Note; +template class Event; /** An iterator over (the x axis of) a 2-d double coordinate space. */ @@ -58,12 +58,11 @@ public: /** This is a higher level view of events, with separate representations for * notes (instead of just unassociated note on/off events) and controller data. * Controller data is represented as a list of time-stamped float values. */ +template class Sequence : virtual public ControlSet { public: Sequence(const TypeMap& type_map, size_t size=0); - bool read_locked() { return _read_iter.locked(); } - void write_lock(); void write_unlock(); @@ -79,116 +78,126 @@ public: bool writing() const { return _writing; } void end_write(bool delete_stuck=false); - size_t read(EventSink& dst, - timestamp_t start, - timedur_t length, - timestamp_t stamp_offset) const; - /** Resizes vector if necessary (NOT realtime safe) */ - void append(const Event& ev); + void append(const Event