* LADSPA-effect: added "Notch Filter" to blacklist
* all effect-plugins: replaced old code with effect::checkGate() call, various cleanups and minor optimizations * effectChain: added debugging-code for determining buggy effect-plugins at higher samplerates * plugin: introduced changable publicName-property * effect: added checkGate()-function for reducing redundant code in effect-plugins git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@981 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -118,6 +118,28 @@ effect * effect::instantiate( const QString & _plugin_name,
|
||||
|
||||
|
||||
|
||||
void effect::checkGate( double _out_sum )
|
||||
{
|
||||
// Check whether we need to continue processing input. Restart the
|
||||
// counter if the threshold has been exceeded.
|
||||
if( _out_sum <= getGate()+0.000001 )
|
||||
{
|
||||
incrementBufferCount();
|
||||
if( getBufferCount() > getTimeout() )
|
||||
{
|
||||
stopRunning();
|
||||
resetBufferCount();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
resetBufferCount();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
pluginView * effect::instantiateView( QWidget * _parent )
|
||||
{
|
||||
return( new effectView( this, _parent ) );
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
#include "engine.h"
|
||||
#include "automatable_model_templates.h"
|
||||
#include "track.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
|
||||
@@ -190,9 +191,22 @@ bool effectChain::processAudioBuffer( sampleFrame * _buf, const fpp_t _frames )
|
||||
}
|
||||
bool more_effects = FALSE;
|
||||
for( effectList::iterator it = m_effects.begin();
|
||||
it != m_effects.end(); it++ )
|
||||
it != m_effects.end(); ++it )
|
||||
{
|
||||
more_effects |= ( *it )->processAudioBuffer( _buf, _frames );
|
||||
#ifdef LMMS_DEBUG
|
||||
for( int f = 0; f < _frames; ++f )
|
||||
{
|
||||
if( fabs( _buf[f][0] ) > 5 || fabs( _buf[f][1] ) > 5 )
|
||||
{
|
||||
it = m_effects.end()-1;
|
||||
printf( "numerical overflow after processing "
|
||||
"plugin \"%s\"\n", ( *it )->
|
||||
publicName().toAscii().constData() );
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return( more_effects );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user