summaryrefslogtreecommitdiff
path: root/gtk2_ardour/sfdb_ui.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-12-06 18:11:19 +0100
committerRobin Gareus <robin@gareus.org>2019-12-06 18:19:01 +0100
commitc5e46ffd30191452dfbd038b2cab9b759f562e7b (patch)
tree6b7b7edbd9ae05fc1344b398aa67ff356db14e0a /gtk2_ardour/sfdb_ui.cc
parentd0b6c437ce0c4e2d1eb41cf3d41f0834a752f302 (diff)
UI limitations for mp3 import
Diffstat (limited to 'gtk2_ardour/sfdb_ui.cc')
-rw-r--r--gtk2_ardour/sfdb_ui.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk2_ardour/sfdb_ui.cc b/gtk2_ardour/sfdb_ui.cc
index 4b8906397d..4b35bde51a 100644
--- a/gtk2_ardour/sfdb_ui.cc
+++ b/gtk2_ardour/sfdb_ui.cc
@@ -1434,6 +1434,7 @@ SoundFileOmega::reset_options ()
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;
@@ -1445,7 +1446,7 @@ SoundFileOmega::reset_options ()
}
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;
}
@@ -1606,7 +1607,7 @@ SoundFileOmega::reset_options ()
/* 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()) {
@@ -1648,7 +1649,7 @@ SoundFileOmega::bad_file_message()
}
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;
@@ -1658,6 +1659,7 @@ SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool&
same_size = true;
src_needed = false;
multichannel = false;
+ must_copy = false;
for (vector<string>::const_iterator i = paths.begin(); i != paths.end(); ++i) {
@@ -1676,6 +1678,9 @@ SoundFileOmega::check_info (const vector<string>& paths, bool& same_size, bool&
if (info.samplerate != _session->sample_rate()) {
src_needed = true;
}
+ if (!info.seekable) {
+ must_copy = true;
+ }
} else if (SMFSource::valid_midi_file (*i)) {