MCPcopy Create free account
hub / github.com/audacity/audacity / Initialize

Method Initialize

libraries/lib-import-export/Import.cpp:167–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167bool Importer::Initialize()
168{
169 // build the list of import plugin and/or unusableImporters.
170 // order is significant. If none match, they will all be tried
171 // in the order defined here.
172
173 using namespace Registry;
174 static OrderingPreferenceInitializer init{
175 PathStart,
176 // FFmpeg is in default of all other modules that might handle a format
177 // better and specially; including MIDI import
178 { {wxT(""), wxT("AUP,PCM,OGG,FLAC,MP3,LOF,WavPack,portsmf,FFmpeg") } }
179 };
180
181 // Once only, visit the registry to collect the plug-ins properly
182 // sorted
183 static std::once_flag flag;
184 std::call_once(flag, []{
185 GroupItem<Traits> top{ PathStart };
186 Registry::Visit(
187 [](const ImporterItem &item, auto&) {
188 sImportPluginList().push_back(item.mpPlugin.get()); },
189 &top, &ImporterItem::Registry());
190 });
191
192 // Ordering of the unusable plugin list is not important.
193
194 ExtImportItems{}.swap(mExtImportItems);
195
196 ReadImportItems();
197
198 return true;
199}
200
201bool Importer::Terminate()
202{

Callers 1

BuildMethod · 0.45

Calls 5

RegistryClass · 0.85
VisitFunction · 0.50
push_backMethod · 0.45
getMethod · 0.45
swapMethod · 0.45

Tested by

no test coverage detected