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

Method LoadXML

libraries/lib-vst/VSTWrapper.cpp:1137–1167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1135}
1136
1137bool VSTWrapper::LoadXML(const wxFileName & fn)
1138{
1139 mInChunk = false;
1140 mInSet = false;
1141
1142 // default to read as XML file
1143 // Load the program
1144 XMLFileReader reader;
1145 bool ok = reader.Parse(this, fn.GetFullPath());
1146
1147 // Something went wrong with the file, clean up
1148 if (mInSet)
1149 {
1150 callDispatcher(effEndSetProgram, 0, 0, NULL, 0.0);
1151
1152 mInSet = false;
1153 }
1154
1155 if (!ok)
1156 {
1157 using namespace BasicUI;
1158 // Inform user of load failure
1159 ShowMessageBox(
1160 reader.GetErrorStr(),
1161 MessageBoxOptions{}
1162 .Caption(XO("Error Loading VST Presets")));
1163 return false;
1164 }
1165
1166 return true;
1167}
1168
1169void VSTWrapper::SaveFXB(const wxFileName & fn) const
1170{

Callers

nothing calls this directly

Calls 2

ShowMessageBoxFunction · 0.85
ParseMethod · 0.45

Tested by

no test coverage detected