add option to keep effects running even without input
This commit is contained in:
@@ -31,6 +31,8 @@
|
||||
#include "EffectControls.h"
|
||||
#include "EffectView.h"
|
||||
|
||||
#include "config_mgr.h"
|
||||
|
||||
|
||||
Effect::Effect( const Plugin::Descriptor * _desc,
|
||||
Model * _parent,
|
||||
@@ -131,6 +133,11 @@ Effect * Effect::instantiate( const QString& pluginName,
|
||||
|
||||
void Effect::checkGate( double _out_sum )
|
||||
{
|
||||
if( configManager::inst()->isAutoquitDisabled() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Check whether we need to continue processing input. Restart the
|
||||
// counter if the threshold has been exceeded.
|
||||
if( _out_sum - gate() <= typeInfo<float>::minEps() )
|
||||
|
||||
@@ -289,6 +289,15 @@ setupDialog::setupDialog( ConfigTabs _tab_to_open ) :
|
||||
connect( displayWaveform, SIGNAL( toggled( bool ) ),
|
||||
this, SLOT( toggleDisplayWaveform( bool ) ) );
|
||||
|
||||
ledCheckBox * disableAutoquit = new ledCheckBox(
|
||||
tr( "Keep effects running even without input" ),
|
||||
misc_tw );
|
||||
labelNumber++;
|
||||
disableAutoquit->move( XDelta, YDelta*labelNumber );
|
||||
disableAutoquit->setChecked( configManager::inst()->isAutoquitDisabled() );
|
||||
connect( disableAutoquit, SIGNAL( toggled( bool ) ),
|
||||
this, SLOT( toggleDisableAutoquit( bool ) ) );
|
||||
|
||||
misc_tw->setFixedHeight( YDelta*labelNumber + HeaderSize );
|
||||
|
||||
|
||||
@@ -813,6 +822,8 @@ void setupDialog::accept()
|
||||
QString::number( m_printNoteLabels ) );
|
||||
configManager::inst()->setValue( "ui", "displaywaveform",
|
||||
QString::number( m_displayWaveform ) );
|
||||
configManager::inst()->setValue( "ui", "disableautoquit",
|
||||
QString::number( configManager::inst()->isAutoquitDisabled() ) );
|
||||
|
||||
|
||||
configManager::inst()->setWorkingDir( m_workingDir );
|
||||
@@ -1002,6 +1013,12 @@ void setupDialog::toggleDisplayWaveform( bool en )
|
||||
}
|
||||
|
||||
|
||||
void setupDialog::toggleDisableAutoquit( bool en )
|
||||
{
|
||||
configManager::inst()->setAutoquitDisabled( en );
|
||||
}
|
||||
|
||||
|
||||
void setupDialog::toggleOneInstrumentTrackWindow( bool _enabled )
|
||||
{
|
||||
m_oneInstrumentTrackWindow = _enabled;
|
||||
|
||||
Reference in New Issue
Block a user