From: David Robillard Date: Sat, 14 Feb 2009 22:40:55 +0000 (+0000) Subject: Remove unused (and timestamp type nasty) last_event_time() from SMF. X-Git-Tag: 3.0-alpha5~3695 X-Git-Url: https://git.carlh.net/gitweb/?a=commitdiff_plain;h=f8d171d297cebc92e844502ad43713b1076017c9;p=ardour.git Remove unused (and timestamp type nasty) last_event_time() from SMF. I swear I already did this. git-svn-id: svn://localhost/ardour2/branches/3.0@4564 d708f5d6-7413-0410-9779-e7cbd77b26cf --- diff --git a/libs/ardour/ardour/smf_source.h b/libs/ardour/ardour/smf_source.h index 470e84b0cc..9981408abc 100644 --- a/libs/ardour/ardour/smf_source.h +++ b/libs/ardour/ardour/smf_source.h @@ -93,6 +93,8 @@ class SMFSource : public MidiSource, public Evoral::SMF { void load_model(bool lock=true, bool force_reload=false); void destroy_model(); + double last_event_time() const { return _last_ev_time; } + void flush_midi(); private: @@ -120,6 +122,7 @@ class SMFSource : public MidiSource, public Evoral::SMF { Flag _flags; string _take_id; bool _allow_remove_if_empty; + double _last_ev_time; static string _search_path; }; diff --git a/libs/ardour/smf_source.cc b/libs/ardour/smf_source.cc index e160d7e277..64bd687418 100644 --- a/libs/ardour/smf_source.cc +++ b/libs/ardour/smf_source.cc @@ -58,6 +58,7 @@ SMFSource::SMFSource (Session& s, std::string path, Flag flags) , Evoral::SMF () , _flags (Flag(flags | Writable)) // FIXME: this needs to be writable for now , _allow_remove_if_empty(true) + , _last_ev_time(0) { /* constructor used for new internal-to-session files. file cannot exist */ @@ -76,6 +77,7 @@ SMFSource::SMFSource (Session& s, const XMLNode& node) : MidiSource (s, node) , _flags (Flag (Writable|CanRename)) , _allow_remove_if_empty(true) + , _last_ev_time(0) { /* constructor used for existing internal-to-session files. file must exist */ @@ -302,6 +304,7 @@ SMFSource::append_event_unlocked(EventTimeUnit unit, const Evoral::Event } Evoral::SMF::append_event_delta(delta_time, ev); + _last_ev_time = ev.time(); _write_data_count += ev.size(); } @@ -357,6 +360,7 @@ SMFSource::mark_streaming_midi_write_started (NoteMode mode, nframes_t start_fra { MidiSource::mark_streaming_midi_write_started (mode, start_frame); Evoral::SMF::begin_write (); + _last_ev_time = 0; } void diff --git a/libs/evoral/evoral/SMF.hpp b/libs/evoral/evoral/SMF.hpp index 59f9448b4e..cdf3170d52 100644 --- a/libs/evoral/evoral/SMF.hpp +++ b/libs/evoral/evoral/SMF.hpp @@ -34,7 +34,8 @@ template class EventRingBuffer; #define THROW_FILE_ERROR throw(typename SMF