stored record file format options in state

This commit is contained in:
essej 2022-06-14 19:18:08 -04:00
parent af5efd8b09
commit dc3e2a99b3

View File

@ -413,6 +413,8 @@ ValueTree PaulstretchpluginAudioProcessor::getStateTree(bool ignoreoptions, bool
storeToTreeProperties(paramtree, nullptr, "autofinishrecord", m_auto_finish_record); storeToTreeProperties(paramtree, nullptr, "autofinishrecord", m_auto_finish_record);
paramtree.setProperty("defRecordDir", m_defaultRecordDir, nullptr); paramtree.setProperty("defRecordDir", m_defaultRecordDir, nullptr);
paramtree.setProperty("defRecordFormat", (int)m_defaultRecordingFormat, nullptr);
paramtree.setProperty("defRecordBitDepth", (int)m_defaultRecordingBitsPerSample, nullptr);
return paramtree; return paramtree;
@ -460,6 +462,8 @@ void PaulstretchpluginAudioProcessor::setStateFromTree(ValueTree tree)
#if !(JUCE_IOS || JUCE_ANDROID) #if !(JUCE_IOS || JUCE_ANDROID)
setDefaultRecordingDirectory(tree.getProperty("defRecordDir", m_defaultRecordDir)); setDefaultRecordingDirectory(tree.getProperty("defRecordDir", m_defaultRecordDir));
#endif #endif
m_defaultRecordingFormat = (RecordFileFormat) (int) tree.getProperty("defRecordFormat", (int)m_defaultRecordingFormat);
m_defaultRecordingBitsPerSample = (int) tree.getProperty("defRecordBitDepth", (int)m_defaultRecordingBitsPerSample);
} }
int prebufamt = tree.getProperty("prebufamount", 2); int prebufamt = tree.getProperty("prebufamount", 2);