add "origin" property to FileSource so that we can track multiple imports

git-svn-id: svn://localhost/ardour2/branches/3.0@7986 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2010-11-09 18:19:53 +00:00
parent cbaba77588
commit 66a9112d48
15 changed files with 65 additions and 43 deletions

View file

@ -53,13 +53,15 @@ using namespace PBD;
SMFSource::SMFSource (Session& s, const string& path, Source::Flag flags)
: Source(s, DataType::MIDI, path, flags)
, MidiSource(s, path)
, FileSource(s, DataType::MIDI, path, flags)
, FileSource(s, DataType::MIDI, path, string(), flags)
, Evoral::SMF()
, _last_ev_time_beats(0.0)
, _last_ev_time_frames(0)
, _smf_last_read_end (0)
, _smf_last_read_time (0)
{
/* note that origin remains empty */
if (init(_path, false)) {
throw failed_constructor ();
}
@ -365,7 +367,9 @@ SMFSource::append_event_unlocked_frames (const Evoral::Event<nframes_t>& ev, fra
XMLNode&
SMFSource::get_state ()
{
return MidiSource::get_state();
XMLNode& node = MidiSource::get_state();
node.add_property (X_("origin"), _origin);
return node;
}
int