Added dummy parameter to mark the plugin state dirty for the host. Readme change.

This commit is contained in:
xenakios 2018-02-07 16:00:49 +02:00
parent e7d34a026d
commit 0a9a087cb2
3 changed files with 15 additions and 5 deletions

View File

@ -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()); });

View File

@ -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<AudioParameterInt*>(getParameters()[index]);
}
AudioParameterBool* getBoolParameter(int index)
{
return dynamic_cast<AudioParameterBool*>(getParameters()[index]);
}
void setDirty();
void setRecordingEnabled(bool b);
bool isRecordingEnabled() { return m_is_recording; }
double getRecordingPositionPercent();

View File

@ -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)