#include "ardour/region_factory.h"
#include "ardour/source_factory.h"
#include "ardour/session.h"
+#include "ardour/smf_source.h"
#include "pbd/memento_command.h"
#include "ardour_ui.h"
}
// kludge (for MIDI we're abusing "channel" for "track" here)
- if (paths.front().rfind(".mid") != Glib::ustring::npos)
+ if (SMFSource::safe_midi_file_extension (paths.front())) {
target_regions = -1;
+ }
if (target_regions == 1) {
}
}
- boost::shared_ptr<Playlist> playlist = existing_track->diskstream()->playlist();
+ boost::shared_ptr<Playlist> playlist = existing_track->playlist();
boost::shared_ptr<Region> copy (RegionFactory::create (region, region->properties()));
begin_reversible_command (_("insert file"));
playlist->clear_history ();
}
boost::shared_ptr<Region> copy (RegionFactory::create (region));
- existing_track->diskstream()->playlist()->add_region (copy, pos);
+ existing_track->playlist()->add_region (copy, pos);
break;
}
if (!at.empty()) {
boost::shared_ptr<Region> copy (RegionFactory::create (region));
at.front()->set_name (basename_nosuffix (copy->name()));
- at.front()->diskstream()->playlist()->add_region (copy, pos);
+ at.front()->playlist()->add_region (copy, pos);
}
break;
}