From dc3e2a99b3145c9b56b9ba77a4a5de413018c9bf Mon Sep 17 00:00:00 2001 From: essej Date: Tue, 14 Jun 2022 19:18:08 -0400 Subject: [PATCH] stored record file format options in state --- Source/PluginProcessor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index 7eb4dd9..db0e58b 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -413,6 +413,8 @@ ValueTree PaulstretchpluginAudioProcessor::getStateTree(bool ignoreoptions, bool storeToTreeProperties(paramtree, nullptr, "autofinishrecord", m_auto_finish_record); paramtree.setProperty("defRecordDir", m_defaultRecordDir, nullptr); + paramtree.setProperty("defRecordFormat", (int)m_defaultRecordingFormat, nullptr); + paramtree.setProperty("defRecordBitDepth", (int)m_defaultRecordingBitsPerSample, nullptr); return paramtree; @@ -460,6 +462,8 @@ void PaulstretchpluginAudioProcessor::setStateFromTree(ValueTree tree) #if !(JUCE_IOS || JUCE_ANDROID) setDefaultRecordingDirectory(tree.getProperty("defRecordDir", m_defaultRecordDir)); #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);