Refactored

This commit is contained in:
2023-05-03 18:06:30 +02:00
parent 6bd4590a54
commit 89502ec978
2 changed files with 39 additions and 17 deletions
+5 -5
View File
@@ -838,7 +838,7 @@ void JaySynthAudioProcessor::bankImportXml (const XmlElement *xml)
if (xml->hasTagName ("JSYNTH_BANK"))
{
XmlElement *xml2 = xml->getFirstChildElement();
bankImportXml_legacy(*xml2);
bankDecodeXml_legacy(*xml2);
}
}
@@ -929,7 +929,7 @@ void JaySynthAudioProcessor::patchImportXml (const XmlElement *xml, JaySynthSoun
}
else if (xml->hasTagName ("JSYNTH_PATCH"))
{
patchImportXml_legacy(*xml, patch);
patchDecodeXml_legacy(*xml, patch);
}
setCurrentProgram(getCurrentProgram());
}
@@ -1003,7 +1003,7 @@ void JaySynthAudioProcessor::saveBankToFile (const File &file)
xml->writeToFile (/*const File &destinationFile*/file, /*dtdToUse*/"");
}
}
void JaySynthAudioProcessor::patchImportXml_legacy(const XmlElement& xml, JaySynthSound *patch)
void JaySynthAudioProcessor::patchDecodeXml_legacy(const XmlElement& xml, JaySynthSound *patch)
{
// ok, now pull out our parameters..
patch->setName(xml.getStringAttribute("NAME"));
@@ -1022,7 +1022,7 @@ void JaySynthAudioProcessor::patchImportXml_legacy(const XmlElement& xml, JaySyn
((JaySynthMidiCC*)patch->getMidiCC())->importXML(&xml);
}
void JaySynthAudioProcessor::bankImportXml_legacy(const XmlElement& xml)
void JaySynthAudioProcessor::bankDecodeXml_legacy(const XmlElement& xml)
{
// make sure that it's actually our type of XML object..
XmlElement *pXML = (XmlElement*)&xml;
@@ -1034,7 +1034,7 @@ void JaySynthAudioProcessor::bankImportXml_legacy(const XmlElement& xml)
break;
JaySynthSound *pPatch = &patches[progID];
patchImportXml_legacy(*pXML, pPatch);
patchDecodeXml_legacy(*pXML, pPatch);
((JaySynthMidiCC*)pPatch->getMidiCC())->importXML(pXML);
pXML = pXML->getNextElement();
}