mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 08:14:58 +01:00
When importing AAF's move some code so that it only gets executed once per Source, rather than once for every Region
Fixes a problem where the Editor's 'Sources' pane was showing too many entries if there were more Regions than Sources.
This commit is contained in:
parent
4b8b5acfc4
commit
a345d05f0f
1 changed files with 10 additions and 11 deletions
|
|
@ -188,7 +188,17 @@ import_sndfile_as_region (Session* s, struct aafiAudioEssencePointer* aafAudioEs
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < channelCount; i++) {
|
for (int i = 0; i < channelCount; i++) {
|
||||||
|
PropertyList proplist;
|
||||||
sources->push_back (status.sources.at (i));
|
sources->push_back (status.sources.at (i));
|
||||||
|
|
||||||
|
proplist.add (ARDOUR::Properties::start, 0);
|
||||||
|
proplist.add (ARDOUR::Properties::length, timecnt_t ((*sources)[0]->length (), pos));
|
||||||
|
proplist.add (ARDOUR::Properties::name, aafAudioEssencePtrList->essenceFile->unique_name);
|
||||||
|
proplist.add (ARDOUR::Properties::layer, 0);
|
||||||
|
proplist.add (ARDOUR::Properties::whole_file, true);
|
||||||
|
proplist.add (ARDOUR::Properties::external, true);
|
||||||
|
|
||||||
|
RegionFactory::create (*sources, proplist);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* build peakfiles */
|
/* build peakfiles */
|
||||||
|
|
@ -213,17 +223,6 @@ import_sndfile_as_region (Session* s, struct aafiAudioEssencePointer* aafAudioEs
|
||||||
region_name = bump_name_once (region_name, '.');
|
region_name = bump_name_once (region_name, '.');
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyList proplist;
|
|
||||||
|
|
||||||
proplist.add (ARDOUR::Properties::start, 0);
|
|
||||||
proplist.add (ARDOUR::Properties::length, timecnt_t ((*sources)[0]->length (), pos));
|
|
||||||
proplist.add (ARDOUR::Properties::name, aafAudioEssencePtrList->essenceFile->unique_name);
|
|
||||||
proplist.add (ARDOUR::Properties::layer, 0);
|
|
||||||
proplist.add (ARDOUR::Properties::whole_file, true);
|
|
||||||
proplist.add (ARDOUR::Properties::external, true);
|
|
||||||
|
|
||||||
region = RegionFactory::create (*sources, proplist);
|
|
||||||
regions.push_back (region);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue