#include <gtkmm2ext/utils.h>
-#include "evoral/SMF.hpp"
+#include "evoral/SMF.h"
#include "ardour/audio_library.h"
#include "ardour/auditioner.h"
return ImportAsTrack;
} else if (str == _("to selected tracks")) {
return ImportToTrack;
- } else if (str == _("to region list")) {
+ } else if (str == _("to source list")) {
return ImportAsRegion;
} else if (str == _("as new tape tracks")) {
return ImportAsTapeTrack;
case ImportToTrack:
return _("to selected tracks");
case ImportAsRegion:
- return _("to region list");
+ return _("to source list");
case ImportAsTapeTrack:
return _("as new tape tracks");
}
bool same_size;
bool src_needed;
+ bool must_copy;
bool selection_includes_multichannel;
bool selection_can_be_embedded_with_links = check_link_status (_session, paths);
ImportMode mode;
}
bool const have_a_midi_file = (i != paths.end ());
- if (check_info (paths, same_size, src_needed, selection_includes_multichannel)) {
+ if (check_info (paths, same_size, src_needed, selection_includes_multichannel, must_copy)) {
Glib::signal_idle().connect (sigc::mem_fun (*this, &SoundFileOmega::bad_file_message));
return false;
}
/* We must copy MIDI files or those from Freesound
* or any file if we are under nsm control */
- bool const must_copy = _session->get_nsm_state() || have_a_midi_file || notebook.get_current_page() == 2;
+ must_copy |= _session->get_nsm_state() || have_a_midi_file || notebook.get_current_page() == 2;
if (UIConfiguration::instance().get_only_copy_imported_files()) {
}
bool
-SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool& src_needed, bool& multichannel)
+SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool& src_needed, bool& multichannel, bool& must_copy)
{
SoundFileInfo info;
samplepos_t sz = 0;
same_size = true;
src_needed = false;
multichannel = false;
+ must_copy = false;
for (vector<string>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
if (info.samplerate != _session->sample_rate()) {
src_needed = true;
}
+ if (!info.seekable) {
+ must_copy = true;
+ }
} else if (SMFSource::valid_midi_file (*i)) {
SoundFileOmega::check_link_status (const Session* s, const vector<string>& paths)
{
std::string tmpdir(Glib::build_filename (s->session_directory().sound_path(), "linktest"));
- bool ret = false;
if (g_mkdir (tmpdir.c_str(), 0744)) {
if (errno != EEXIST) {
}
}
- ret = true;
-
- out:
g_rmdir (tmpdir.c_str());
- return ret;
+
+ return true;
}
SoundFileChooser::SoundFileChooser (string title, ARDOUR::Session* s)