XmlElement* Track::DumpXml(int formatVersion) const { XmlElement* node = new XmlElement(tag::kTrack); node->setAttribute(tag::kFileFormat, formatVersion); node->setAttribute(tag::kName, fName); node->setAttribute(tag::kMuted, fMuted); node->setAttribute(tag::kSoloed, (this == fScumbler->GetSoloTrack())); //node->setAttribute("active", this->IsActive()); node->setAttribute(tag::kInputGain, fInputGain); node->setAttribute(tag::kPan, fPan); node->setAttribute(tag::kOutputVolume, fOutputVolume); node->setAttribute(tag::kChannels, static_cast<int>(this->GetEnabledChannels())); // store the pre-loop plugins XmlElement* preNode = node->createNewChildElement(tag::kPreBlock); preNode->addChildElement(fPreEffects->DumpXml(formatVersion)); // !!! store the loop info XmlElement* loopNode = node->createNewChildElement(tag::kLoop); loopNode->setAttribute(tag::kLoopDuration, fLoop->GetLoopDuration()); loopNode->setAttribute(tag::kLoopFeedback, fLoop->GetFeedback()); LoopProcessor::LoopInfo info; fLoop->GetLoopInfo(info); loopNode->setAttribute(tag::kLoopPosition, info.fLoopSample); XmlElement* postNode = node->createNewChildElement(tag::kPostBlock); postNode->addChildElement(fPostEffects->DumpXml(formatVersion)); return node; }
virtual void writeToXML(XmlElement& inXML) override { // DBGM("In DecibelParameter::writeToXML(inXML) "); XmlElement* thisXML = inXML.createNewChildElement(this->name); thisXML->setAttribute("parameterValue", getValue()); thisXML->setAttribute("defaultValue", getDefaultValue()); thisXML->setAttribute("isSmoothed", getShouldBeSmoothed()); thisXML->setAttribute("minDecibels", getMinDecibels()); thisXML->setAttribute("maxDecibels", getMaxDecibels()); thisXML->setAttribute("unityDecibels", getUnityDecibels()); thisXML->setAttribute("midValue", getMidValue()); }
void SpikeDisplayCanvas::saveVisualizerParameters(XmlElement* xml) { XmlElement* xmlNode = xml->createNewChildElement("SPIKEDISPLAY"); xmlNode->setAttribute("LockThresholds",lockThresholdsButton->getToggleState()); xmlNode->setAttribute("InvertSpikes",invertSpikesButton->getToggleState()); for (int i = 0; i < spikeDisplay->getNumPlots(); i++) { XmlElement* plotNode = xmlNode->createNewChildElement("PLOT"); for (int j = 0; j < spikeDisplay->getNumChannelsForPlot(i); j++) { XmlElement* axisNode = plotNode->createNewChildElement("AXIS"); axisNode->setAttribute("thresh",spikeDisplay->getThresholdForWaveAxis(i,j)); axisNode->setAttribute("range",spikeDisplay->getRangeForWaveAxis(i,j)); } } }
void prepareExporter (ProjectExporter& exporter) const { exporter.xcodeIsBundle = true; exporter.xcodeCreatePList = true; exporter.xcodeFileType = "wrapper.cfbundle"; exporter.xcodeBundleExtension = ".plugin"; exporter.xcodeProductType = "com.apple.product-type.bundle"; exporter.xcodeProductInstallPath = "$(HOME)/Library/Internet Plug-Ins//"; { XmlElement mimeTypesKey ("key"); mimeTypesKey.setText ("WebPluginMIMETypes"); XmlElement mimeTypesEntry ("dict"); const String exeName (exporter.getProject().getProjectFilenameRoot().toLowerCase()); mimeTypesEntry.createNewChildElement ("key")->setText ("application/" + exeName + "-plugin"); XmlElement* d = mimeTypesEntry.createNewChildElement ("dict"); d->createNewChildElement ("key")->setText ("WebPluginExtensions"); d->createNewChildElement ("array") ->createNewChildElement ("string")->setText (exeName); d->createNewChildElement ("key")->setText ("WebPluginTypeDescription"); d->createNewChildElement ("string")->setText (exporter.getProject().getTitle()); exporter.xcodeExtraPListEntries.add (mimeTypesKey); exporter.xcodeExtraPListEntries.add (mimeTypesEntry); } exporter.msvcTargetSuffix = ".dll"; exporter.msvcIsDLL = true; exporter.msvcExtraPreprocessorDefs.set ("_CRT_SECURE_NO_WARNINGS", ""); exporter.makefileIsDLL = true; }
void ProcessorList::saveStateToXml(XmlElement* xml) { XmlElement* processorListState = xml->createNewChildElement("PROCESSORLIST"); for (int i = 0; i < 5; i++) { XmlElement* colorState = processorListState->createNewChildElement("COLOR"); int id; switch (i) { case 0: id = PROCESSOR_COLOR; break; case 1: id = SOURCE_COLOR; break; case 2: id = FILTER_COLOR; break; case 3: id = SINK_COLOR; break; case 4: id = UTILITY_COLOR; break; default: // do nothing ; } Colour c = findColour(id); colorState->setAttribute("ID", (int) id); colorState->setAttribute("R", (int) c.getRed()); colorState->setAttribute("G", (int) c.getGreen()); colorState->setAttribute("B", (int) c.getBlue()); } }
void ControlPanel::saveStateToXml(XmlElement* xml) { XmlElement* controlPanelState = xml->createNewChildElement("CONTROLPANEL"); controlPanelState->setAttribute("isOpen",open); controlPanelState->setAttribute("recordPath", filenameComponent->getCurrentFile().getFullPathName()); controlPanelState->setAttribute("prependText",prependText->getText()); controlPanelState->setAttribute("appendText",appendText->getText()); controlPanelState->setAttribute("recordEngine",recordSelector->getSelectedId()); audioEditor->saveStateToXml(xml); XmlElement* recordEnginesState = xml->createNewChildElement("RECORDENGINES"); for (int i=0; i < recordEngines.size(); i++) { XmlElement* reState = recordEnginesState->createNewChildElement("ENGINE"); reState->setAttribute("id",recordEngines[i]->getID()); reState->setAttribute("name",recordEngines[i]->getName()); recordEngines[i]->saveParametersToXml(reState); } }
void ZenTime::writeToXML(XmlElement& inXML) { // DBG("In ZenParameter::writeToXML(inXML) "); XmlElement* thisXML = inXML.createNewChildElement(paramID); thisXML->setAttribute("valueInMS", (int)getValueInMS()); }