void operator()();
void undo();
-
- int set_state (const XMLNode&, int version = 3000);
+
+ int set_state (const XMLNode&, int version);
XMLNode& get_state ();
void add(const boost::shared_ptr< Evoral::Note<TimeType> > note);
void operator()();
void undo();
-
- int set_state (const XMLNode&, int version = 3000);
+
+ int set_state (const XMLNode&, int version);
XMLNode& get_state ();
void change (const boost::shared_ptr<Evoral::Note<TimeType> > note,
struct NotePropertyChange {
DiffCommand::Property property;
- boost::shared_ptr<Evoral::Note<TimeType> > note;
+ boost::shared_ptr< Evoral::Note<TimeType> > note;
union {
- uint8_t old_value;
+ uint8_t old_value;
TimeType old_time;
};
union {
- uint8_t new_value;
+ uint8_t new_value;
TimeType new_time;
};
};
void apply_command(Session& session, Command* cmd);
void apply_command_as_subcommand(Session& session, Command* cmd);
-
-
bool write_to(boost::shared_ptr<MidiSource> source);
// MidiModel doesn't use the normal AutomationList serialisation code
XMLNode& get_state();
int set_state(const XMLNode&) { return 0; }
- sigc::signal<void> ContentsChanged;
+ PBD::Signal0<void> ContentsChanged;
const MidiSource* midi_source() const { return _midi_source; }
void set_midi_source(MidiSource* source) { _midi_source = source; }
boost::shared_ptr<Evoral::Note<TimeType> > find_note (boost::shared_ptr<Evoral::Note<TimeType> >);
+private:
+ struct WriteLockImpl : public AutomatableSequence<Evoral::MusicalTime>::WriteLockImpl {
+ WriteLockImpl(Glib::Mutex::Lock* source_lock, Glib::RWLock& s, Glib::Mutex& c)
+ : AutomatableSequence<Evoral::MusicalTime>::WriteLockImpl(s, c)
+ , source_lock(source_lock)
+ {}
+ ~WriteLockImpl() {
+ delete source_lock;
+ }
+ Glib::Mutex::Lock* source_lock;
+ };
+
+public:
+ virtual WriteLock edit_lock();
+ virtual WriteLock write_lock();
+
private:
friend class DeltaCommand;