| 1135 | } |
| 1136 | |
| 1137 | bool 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 | |
| 1169 | void VSTWrapper::SaveFXB(const wxFileName & fn) const |
| 1170 | { |
nothing calls this directly
no test coverage detected