- constify
- refactored MidiCC - JaySynthSound is not MidiCC, but has MidiCC - refactored xml import export for patches and banks
This commit is contained in:
+12
-15
@@ -115,10 +115,11 @@ JaySynthMidiCC& JaySynthMidiCC::operator= (JaySynthMidiCC& other)
|
||||
return *this;
|
||||
}
|
||||
|
||||
void JaySynthMidiCC::copyMidiCC(JaySynthMidiCC *pSrc)
|
||||
void JaySynthMidiCC::copyMidiCC(JaySynthMidiCC const *pSrc)
|
||||
{
|
||||
int i;
|
||||
midiCC_container_t *pMidiContainerSrc, *pMidiContainerDst;
|
||||
midiCC_container_t const *pMidiContainerSrc;
|
||||
midiCC_container_t *pMidiContainerDst;
|
||||
|
||||
for (i=0; i < NUM_MIDI_CONTROLLERS; i++)
|
||||
removeDestinations(i);
|
||||
@@ -153,22 +154,18 @@ void JaySynthMidiCC::copyMidiCC(JaySynthMidiCC *pSrc)
|
||||
isModified = false;
|
||||
}
|
||||
|
||||
bool JaySynthMidiCC::isMidiCCmodified(void)
|
||||
bool JaySynthMidiCC::isMidiCCmodified(void) const
|
||||
{
|
||||
return isModified;
|
||||
}
|
||||
|
||||
JaySynthMidiCC* JaySynthMidiCC::getMidiCC(void)
|
||||
String JaySynthMidiCC::toParameterNameXML (String const &name) const
|
||||
{
|
||||
return this;
|
||||
}
|
||||
String result;
|
||||
result = name.removeCharacters (String("."));
|
||||
result = result.replaceCharacter (' ','_');
|
||||
|
||||
const String JaySynthMidiCC::toParameterNameXML (String name)
|
||||
{
|
||||
name = name.removeCharacters (String("."));
|
||||
name = name.replaceCharacter (' ','_');
|
||||
|
||||
return name;
|
||||
return result;
|
||||
}
|
||||
|
||||
int JaySynthMidiCC::findParamID_byName(String name)
|
||||
@@ -187,10 +184,10 @@ void JaySynthMidiCC::exportXML(String name)
|
||||
xml.writeToFile (/*const File &destinationFile*/file, /*const String &dtdToUse*/"JSYNTH_MIDICC_TABLE_FILE" /*, const String &encodingType="UTF-8", int lineWrapLength=60*/);
|
||||
}
|
||||
|
||||
void JaySynthMidiCC::exportXML(XmlElement *pXML_doc)
|
||||
void JaySynthMidiCC::exportXML(XmlElement *pXML_doc) const
|
||||
{
|
||||
int paramID;
|
||||
midiCC_container_t *pMidiContainer;
|
||||
midiCC_container_t const *pMidiContainer;
|
||||
XmlElement *pXML, *pXML_root, *pXML_PARAM, *pXML_PARAM_INFO;
|
||||
|
||||
// Store controller and slider infos
|
||||
@@ -279,7 +276,7 @@ int JaySynthMidiCC::importXML(String name)
|
||||
return importXML(pXML_root);
|
||||
}
|
||||
|
||||
int JaySynthMidiCC::importXML(XmlElement *pXML_doc)
|
||||
int JaySynthMidiCC::importXML(XmlElement const *pXML_doc)
|
||||
{
|
||||
int i, paramID;
|
||||
midiCC_container_t *pMidiContainer;
|
||||
|
||||
Reference in New Issue
Block a user