13
0

dd import_markers option (2/4)

This commit is contained in:
Robin Gareus 2022-11-22 01:45:42 +01:00
parent 4f4b931ccc
commit 4e77bbdd96
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 8 additions and 5 deletions

View File

@ -1458,6 +1458,7 @@ private:
boost::shared_ptr<ARDOUR::Track>& track,
std::string const& pgroup_id,
bool replace,
bool with_markers,
boost::shared_ptr<ARDOUR::PluginInfo> instrument = boost::shared_ptr<ARDOUR::PluginInfo>());
int embed_sndfiles (std::vector<std::string> paths,

View File

@ -439,7 +439,7 @@ Editor::do_import (vector<string> paths,
if (!cancel) {
ipw.show ();
import_sndfiles (paths, disposition, mode, quality, pos, 1, 1, track, pgroup_id, false, instrument);
import_sndfiles (paths, disposition, mode, quality, pos, 1, 1, track, pgroup_id, false, with_markers, instrument);
import_status.clear();
}
@ -485,7 +485,7 @@ Editor::do_import (vector<string> paths,
track = get_nth_selected_audio_track (nth++);
}
import_sndfiles (to_import, disposition, mode, quality, pos, 1, -1, track, pgroup_id, replace, instrument);
import_sndfiles (to_import, disposition, mode, quality, pos, 1, -1, track, pgroup_id, replace, with_markers, instrument);
import_status.clear();
break;
@ -494,7 +494,7 @@ Editor::do_import (vector<string> paths,
to_import.clear ();
to_import.push_back (*a);
import_sndfiles (to_import, disposition, mode, quality, pos, -1, -1, track, pgroup_id, replace, instrument);
import_sndfiles (to_import, disposition, mode, quality, pos, -1, -1, track, pgroup_id, replace, with_markers, instrument);
import_status.clear();
break;
@ -503,7 +503,7 @@ Editor::do_import (vector<string> paths,
to_import.clear ();
to_import.push_back (*a);
import_sndfiles (to_import, disposition, mode, quality, pos, 1, 1, track, pgroup_id, replace, instrument);
import_sndfiles (to_import, disposition, mode, quality, pos, 1, 1, track, pgroup_id, replace, with_markers, instrument);
import_status.clear();
break;
@ -611,6 +611,7 @@ Editor::import_sndfiles (vector<string> paths,
boost::shared_ptr<Track>& track,
std::string const& pgroup_id,
bool replace,
bool with_markers,
ARDOUR::PluginInfoPtr instrument)
{
/* skip periodic saves while importing */
@ -622,6 +623,7 @@ Editor::import_sndfiles (vector<string> paths,
import_status.quality = quality;
import_status.replace_existing_source = replace;
import_status.split_midi_channels = (disposition == Editing::ImportDistinctChannels);
import_status.import_markers = with_markers;
import_status.mode = mode;
import_status.pos = pos;

View File

@ -99,7 +99,7 @@ Editor::embed_audio_from_video (std::string path, samplepos_t n, bool lock_posit
std::string const& gid = ARDOUR::Playlist::generate_pgroup_id ();
Temporal::timepos_t pos (n);
bool ok = import_sndfiles (paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, ARDOUR::SrcBest, pos, 1, 1, track, gid, false) == 0;
bool ok = import_sndfiles (paths, Editing::ImportDistinctFiles, Editing::ImportAsTrack, ARDOUR::SrcBest, pos, 1, 1, track, gid, false, false) == 0;
import_status.clear();
if (ok && track) {