From 0a9a087cb29893c1adb1908fa66c4c1aa5c47336 Mon Sep 17 00:00:00 2001 From: xenakios Date: Wed, 7 Feb 2018 16:00:49 +0200 Subject: [PATCH] Added dummy parameter to mark the plugin state dirty for the host. Readme change. --- Source/PluginProcessor.cpp | 11 +++++++---- Source/PluginProcessor.h | 6 ++++++ readme.txt | 3 ++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Source/PluginProcessor.cpp b/Source/PluginProcessor.cpp index ed08f41..0a3a7e7 100644 --- a/Source/PluginProcessor.cpp +++ b/Source/PluginProcessor.cpp @@ -156,6 +156,7 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor() addParameter(new AudioParameterBool("pause_enabled0", "Pause", false)); // 28 addParameter(new AudioParameterFloat("maxcapturelen_0", "Max capture length", 1.0f, 120.0f, 10.0f)); // 29 addParameter(new AudioParameterBool("passthrough0", "Pass input through", false)); // 30 + addParameter(new AudioParameterBool("markdirty0", "Internal (don't use)", false)); // 31 auto& pars = getParameters(); for (const auto& p : pars) m_reset_pars.push_back(p->getValue()); @@ -639,6 +640,11 @@ void PaulstretchpluginAudioProcessor::setStateInformation (const void* data, int setStateFromTree(tree); } +void PaulstretchpluginAudioProcessor::setDirty() +{ + *getBoolParameter(cpi_markdirty) = !(*getBoolParameter(cpi_markdirty)); +} + void PaulstretchpluginAudioProcessor::setRecordingEnabled(bool b) { ScopedLock locker(m_cs); @@ -671,10 +677,6 @@ double PaulstretchpluginAudioProcessor::getRecordingPositionPercent() String PaulstretchpluginAudioProcessor::setAudioFile(File f) { - //if (f==File()) - // return String(); - //if (f==m_current_file && f.getLastModificationTime()==m_current_file_date) - // return String(); auto ai = unique_from_raw(m_afm->createReaderFor(f)); if (ai != nullptr) { @@ -697,6 +699,7 @@ String PaulstretchpluginAudioProcessor::setAudioFile(File f) m_current_file = f; m_current_file_date = m_current_file.getLastModificationTime(); m_using_memory_buffer = false; + setDirty(); return String(); //MessageManager::callAsync([cb, file]() { cb(String()); }); diff --git a/Source/PluginProcessor.h b/Source/PluginProcessor.h index 35e22b3..01480fb 100644 --- a/Source/PluginProcessor.h +++ b/Source/PluginProcessor.h @@ -56,6 +56,7 @@ const int cpi_num_outchans = 27; const int cpi_pause_enabled = 28; const int cpi_max_capture_len = 29; const int cpi_passthrough = 30; +const int cpi_markdirty = 31; class MyPropertiesFile { @@ -130,6 +131,11 @@ public: { return dynamic_cast(getParameters()[index]); } + AudioParameterBool* getBoolParameter(int index) + { + return dynamic_cast(getParameters()[index]); + } + void setDirty(); void setRecordingEnabled(bool b); bool isRecordingEnabled() { return m_is_recording; } double getRecordingPositionPercent(); diff --git a/readme.txt b/readme.txt index 0bf877c..c33499f 100644 --- a/readme.txt +++ b/readme.txt @@ -17,8 +17,9 @@ Requirements for building from source code : History : -02-06-2018 1.0.0 +02-07-2018 1.0.0 -Control/Command click on waveform seeks (if click within active play range) + -Moved prebuffering amount menu to prebuffering meter (click to show) 02-02-2018 1.0.0 preview 5 -Added buttons to enable/disable spectral processing modules -Restored ability to set capture buffer length (via the settings menu)