| 52 | } |
| 53 | |
| 54 | void NeuralNoteAudioProcessor::getStateInformation(MemoryBlock& destData) |
| 55 | { |
| 56 | auto full_state_tree = ValueTree(NnId::FullStateId); |
| 57 | |
| 58 | full_state_tree.setProperty(NnId::NeuralNoteVersionId, ProjectInfo::versionString, nullptr); |
| 59 | |
| 60 | // PARAMETERS |
| 61 | auto apvts = mAPVTS.copyState(); |
| 62 | jassert(apvts.getType() == NnId::ParametersId); |
| 63 | |
| 64 | full_state_tree.appendChild(apvts, nullptr); |
| 65 | |
| 66 | // NEURAL NOTE STATE |
| 67 | // Update value tree with current state |
| 68 | mPlayer->saveStateToValueTree(); |
| 69 | |
| 70 | full_state_tree.appendChild(mValueTree, nullptr); |
| 71 | |
| 72 | std::unique_ptr<XmlElement> xml(full_state_tree.createXml()); |
| 73 | |
| 74 | if (xml != nullptr) { |
| 75 | copyXmlToBinary(*xml, destData); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | void NeuralNoteAudioProcessor::setStateInformation(const void* data, int sizeInBytes) |
| 80 | { |
nothing calls this directly
no test coverage detected