Save and restore mute while capturing state

This commit is contained in:
xenakios 2018-06-04 23:27:08 +03:00
parent 24cac9b5c1
commit 857c2adf2a

View File

@ -246,6 +246,7 @@ ValueTree PaulstretchpluginAudioProcessor::getStateTree(bool ignoreoptions, bool
paramtree.setProperty("prebufamount", -1, nullptr);
paramtree.setProperty("loadfilewithstate", m_load_file_with_state, nullptr);
storeToTreeProperties(paramtree, nullptr, "playwhenhostrunning", m_play_when_host_plays, "capturewhenhostrunning", m_capture_when_host_plays);
storeToTreeProperties(paramtree, nullptr, "mutewhilecapturing", m_mute_while_capturing);
}
storeToTreeProperties(paramtree, nullptr, "waveviewrange", m_wave_view_range);
ValueTree freefilterstate = m_free_filter_envelope->saveState(Identifier("freefilter_envelope"));
@ -262,7 +263,8 @@ void PaulstretchpluginAudioProcessor::setStateFromTree(ValueTree tree)
ValueTree freefilterstate = tree.getChildWithName("freefilter_envelope");
m_free_filter_envelope->restoreState(freefilterstate);
m_load_file_with_state = tree.getProperty("loadfilewithstate", true);
getFromTreeProperties(tree, "playwhenhostrunning", m_play_when_host_plays, "capturewhenhostrunning", m_capture_when_host_plays);
getFromTreeProperties(tree, "playwhenhostrunning", m_play_when_host_plays,
"capturewhenhostrunning", m_capture_when_host_plays,"mutewhilecapturing",m_mute_while_capturing);
if (tree.hasProperty("numspectralstagesb"))
{
std::vector<SpectrumProcess> old_order = m_stretch_source->getSpectrumProcessOrder();