Browse Source

Added parameter for max capture length

tags/v100_p5
xenakios 7 years ago
parent
commit
8c9749a90c
2 changed files with 7 additions and 0 deletions
  1. +6
    -0
      Source/PluginProcessor.cpp
  2. +1
    -0
      Source/PluginProcessor.h

+ 6
- 0
Source/PluginProcessor.cpp View File

@@ -145,6 +145,7 @@ PaulstretchpluginAudioProcessor::PaulstretchpluginAudioProcessor()
m_outchansparam = new AudioParameterInt("numoutchans0", "Num output channels", 2, 8, 2); // 27 m_outchansparam = new AudioParameterInt("numoutchans0", "Num output channels", 2, 8, 2); // 27
addParameter(m_outchansparam); // 27 addParameter(m_outchansparam); // 27
addParameter(new AudioParameterBool("pause_enabled0", "Pause", false)); // 28 addParameter(new AudioParameterBool("pause_enabled0", "Pause", false)); // 28
addParameter(new AudioParameterFloat("maxcapturelen_0", "Max capture length", 1.0f, 120.0f, 10.0f)); // 29
startTimer(1, 50); startTimer(1, 50);
} }


@@ -576,6 +577,11 @@ void PaulstretchpluginAudioProcessor::timerCallback(int id)
if (id == 1) if (id == 1)
{ {
bool capture = getParameter(cpi_capture_enabled); bool capture = getParameter(cpi_capture_enabled);
if (capture == false && m_max_reclen != *getFloatParameter(cpi_max_capture_len))
{
m_max_reclen = *getFloatParameter(cpi_max_capture_len);
//Logger::writeToLog("Changing max capture len to " + String(m_max_reclen));
}
if (capture == true && m_is_recording == false) if (capture == true && m_is_recording == false)
{ {
setRecordingEnabled(true); setRecordingEnabled(true);


+ 1
- 0
Source/PluginProcessor.h View File

@@ -54,6 +54,7 @@ const int cpi_onsetdetection = 25;
const int cpi_capture_enabled = 26; const int cpi_capture_enabled = 26;
const int cpi_num_outchans = 27; const int cpi_num_outchans = 27;
const int cpi_pause_enabled = 28; const int cpi_pause_enabled = 28;
const int cpi_max_capture_len = 29;


class PaulstretchpluginAudioProcessor : public AudioProcessor, public MultiTimer class PaulstretchpluginAudioProcessor : public AudioProcessor, public MultiTimer
{ {


Loading…
Cancel
Save