Added parameter for max capture length
This commit is contained in:
parent
f3d769504d
commit
8c9749a90c
@ -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);
|
||||||
|
@ -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…
Reference in New Issue
Block a user