mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-31 10:57:43 +01:00
do not actually import newly-created SMF sources
TO-DO: ensure the empty sources are somehow removed
This commit is contained in:
parent
ac83860032
commit
de542e9d29
1 changed files with 15 additions and 2 deletions
|
|
@ -283,7 +283,7 @@ Editor::import_smf_tempo_map (Evoral::SMF const & smf, timepos_t const & pos)
|
|||
|
||||
if (tmcb && !tmcb->empty()) {
|
||||
std::cerr << "CB\n";
|
||||
tmcb->dump (std::cerr);
|
||||
tmcb->dump (std::cerr);
|
||||
wmap->paste (*tmcb, pos, false, _("import"));
|
||||
TempoMap::update (wmap);
|
||||
std::cerr << "final map\n";
|
||||
|
|
@ -743,7 +743,7 @@ Editor::embed_sndfiles (vector<string> paths,
|
|||
|
||||
int
|
||||
Editor::add_sources (vector<string> paths,
|
||||
SourceList& sources,
|
||||
SourceList& possible_sources,
|
||||
timepos_t& pos,
|
||||
ImportDisposition disposition,
|
||||
ImportMode mode,
|
||||
|
|
@ -763,6 +763,18 @@ Editor::add_sources (vector<string> paths,
|
|||
|
||||
use_timestamp = (pos == timepos_t::max (pos.time_domain()));
|
||||
|
||||
SourceList sources;
|
||||
|
||||
for (auto const & s : possible_sources) {
|
||||
if (!s->empty()) {
|
||||
sources.push_back (s);
|
||||
}
|
||||
}
|
||||
|
||||
if (sources.empty()) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// kludge (for MIDI we're abusing "channel" for "track" here)
|
||||
if (SMFSource::safe_midi_file_extension (paths.front())) {
|
||||
target_regions = -1;
|
||||
|
|
@ -891,6 +903,7 @@ Editor::add_sources (vector<string> paths,
|
|||
}
|
||||
|
||||
regions.push_back (r);
|
||||
++n;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue