Refactored
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user