Store and recall some settings that were not previously handled in the plugin state
This commit is contained in:
		@@ -241,6 +241,7 @@ ValueTree PaulstretchpluginAudioProcessor::getStateTree(bool ignoreoptions, bool
 | 
				
			|||||||
		else
 | 
							else
 | 
				
			||||||
			paramtree.setProperty("prebufamount", -1, nullptr);
 | 
								paramtree.setProperty("prebufamount", -1, nullptr);
 | 
				
			||||||
		paramtree.setProperty("loadfilewithstate", m_load_file_with_state, 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, "waveviewrange", m_wave_view_range);
 | 
						storeToTreeProperties(paramtree, nullptr, "waveviewrange", m_wave_view_range);
 | 
				
			||||||
    ValueTree freefilterstate = m_free_filter_envelope->saveState(Identifier("freefilter_envelope"));
 | 
					    ValueTree freefilterstate = m_free_filter_envelope->saveState(Identifier("freefilter_envelope"));
 | 
				
			||||||
@@ -257,6 +258,7 @@ void PaulstretchpluginAudioProcessor::setStateFromTree(ValueTree tree)
 | 
				
			|||||||
            ValueTree freefilterstate = tree.getChildWithName("freefilter_envelope");
 | 
					            ValueTree freefilterstate = tree.getChildWithName("freefilter_envelope");
 | 
				
			||||||
            m_free_filter_envelope->restoreState(freefilterstate);
 | 
					            m_free_filter_envelope->restoreState(freefilterstate);
 | 
				
			||||||
            m_load_file_with_state = tree.getProperty("loadfilewithstate", true);
 | 
					            m_load_file_with_state = tree.getProperty("loadfilewithstate", true);
 | 
				
			||||||
 | 
								getFromTreeProperties(tree, "playwhenhostrunning", m_play_when_host_plays, "capturewhenhostrunning", m_capture_when_host_plays);
 | 
				
			||||||
			if (tree.hasProperty("numspectralstagesb"))
 | 
								if (tree.hasProperty("numspectralstagesb"))
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				std::vector<SpectrumProcess> old_order = m_stretch_source->getSpectrumProcessOrder();
 | 
									std::vector<SpectrumProcess> old_order = m_stretch_source->getSpectrumProcessOrder();
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user