diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index d5d1418..6247b16 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -241,7 +241,6 @@ int PaulstretchpluginAudioProcessor::getPreBufferAmount() ValueTree PaulstretchpluginAudioProcessor::getStateTree(bool ignoreoptions, bool ignorefile) { ValueTree paramtree("paulstretch3pluginstate"); - paramtree.setProperty("captureuuid", m_capture_uuid, nullptr); storeToTreeProperties(paramtree, nullptr, getParameters()); if (m_current_file != File() && ignorefile == false) { @@ -313,15 +312,6 @@ void PaulstretchpluginAudioProcessor::setStateFromTree(ValueTree tree) { setAudioFile(File(fn)); } - else - { - String captureuuid = tree.getProperty("captureuuid"); - if (captureuuid.isEmpty() == false) - { - String capturefn = "C:\\Users\\Teemu\\AppData\\Roaming\\PaulXStretch\\audio_captures\\" + captureuuid + ".wav"; - setAudioFile(File(capturefn)); - } - } } m_state_dirty = true; } @@ -509,7 +499,7 @@ void PaulstretchpluginAudioProcessor::saveCaptureBuffer() jassert(sourcebuffer->getNumSamples() > 0); Logger::writeToLog("Saving capture to file " + outfn); writer->writeFromAudioSampleBuffer(*sourcebuffer, 0, sourcebuffer->getNumSamples()); - m_capture_uuid = uid.toString(); + m_current_file = outfile; } else { diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index 190ec9d..dd16435 100644 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -265,7 +265,7 @@ private: bool m_lastrewind = false; AudioFilePreviewComponent* m_previewcomponent = nullptr; void saveCaptureBuffer(); - String m_capture_uuid; + //============================================================================== JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PaulstretchpluginAudioProcessor) };