From 551363242269e7d32977262afd0d652a101acead Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 4 May 2009 19:58:48 +0000 Subject: [PATCH] Fix MIDI recording. git-svn-id: svn://localhost/ardour2/branches/3.0@5039 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/midi_model.cc | 2 ++ libs/ardour/midi_source.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index abf651207e..0c0c0ead5b 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -78,11 +78,13 @@ MidiModel::DeltaCommand::DeltaCommand(boost::shared_ptr m, const std: , _model(m) , _name(name) { + assert(_model); } MidiModel::DeltaCommand::DeltaCommand(boost::shared_ptr m, const XMLNode& node) : _model(m) { + assert(_model); set_state(node); } diff --git a/libs/ardour/midi_source.cc b/libs/ardour/midi_source.cc index 9f0a021274..b66d6c6b13 100644 --- a/libs/ardour/midi_source.cc +++ b/libs/ardour/midi_source.cc @@ -168,7 +168,7 @@ MidiSource::midi_write (MidiRingBuffer& source, sframes_t source_star { Glib::Mutex::Lock lm (_lock); const nframes_t ret = write_unlocked (source, source_start, duration); - _last_write_end = source_start + duration; + _last_write_end += duration; return ret; }