closes #10
This commit is contained in:
@ -95,10 +95,15 @@ void WebViewPluginAudioProcessor::processBlock(juce::AudioBuffer<float>& buffer,
|
||||
//==============================================================================
|
||||
void WebViewPluginAudioProcessor::getStateInformation(juce::MemoryBlock& destData)
|
||||
{
|
||||
juce::ignoreUnused(destData);
|
||||
auto out_state = state.copyState();
|
||||
std::unique_ptr<juce::XmlElement> xml(out_state.createXml());
|
||||
copyXmlToBinary(*xml, destData);
|
||||
}
|
||||
|
||||
void WebViewPluginAudioProcessor::setStateInformation(const void* data, int sizeInBytes)
|
||||
{
|
||||
juce::ignoreUnused(data, sizeInBytes);
|
||||
std::unique_ptr<juce::XmlElement> xmlState(getXmlFromBinary(data, sizeInBytes));
|
||||
|
||||
if (xmlState.get() != nullptr && xmlState->hasTagName(state.state.getType()))
|
||||
state.replaceState(juce::ValueTree::fromXml(*xmlState));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user