Merge remote-tracking branch 'origin/master' into refac/memory
This commit is contained in:
@@ -83,7 +83,6 @@ bool AmplifierEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
for( fpp_t f = 0; f < frames; ++f )
|
||||
{
|
||||
// qDebug( "offset %d, value %f", f, m_ampControls.m_volumeModel.value( f ) );
|
||||
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
|
||||
|
||||
sample_t s[2] = { buf[f][0], buf[f][1] };
|
||||
|
||||
@@ -123,6 +122,7 @@ bool AmplifierEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames )
|
||||
|
||||
buf[f][0] = d * buf[f][0] + w * s[0];
|
||||
buf[f][1] = d * buf[f][1] + w * s[1];
|
||||
outSum += buf[f][0] * buf[f][0] + buf[f][1] * buf[f][1];
|
||||
}
|
||||
|
||||
checkGate( outSum / frames );
|
||||
|
||||
@@ -100,13 +100,13 @@ bool BassBoosterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
|
||||
//float gain = gainBuffer ? gainBuffer[f] : gain;
|
||||
m_bbFX.leftFX().setGain( gain );
|
||||
m_bbFX.rightFX().setGain( gain);
|
||||
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
|
||||
|
||||
sample_t s[2] = { buf[f][0], buf[f][1] };
|
||||
m_bbFX.nextSample( s[0], s[1] );
|
||||
|
||||
buf[f][0] = d * buf[f][0] + w * s[0];
|
||||
buf[f][1] = d * buf[f][1] + w * s[1];
|
||||
outSum += buf[f][0] * buf[f][0] + buf[f][1] * buf[f][1];
|
||||
}
|
||||
|
||||
checkGate( outSum / frames );
|
||||
|
||||
@@ -40,7 +40,7 @@ BitcrushControls::BitcrushControls( BitcrushEffect * eff ) :
|
||||
m_outClip( 0.0f, -20.0f, 20.0f, 0.1f, this, tr( "Output clip" ) ),
|
||||
m_rate( 44100.f, 20.f, 44100.f, 1.0f, this, tr( "Sample rate" ) ),
|
||||
m_stereoDiff( 0.f, 0.f, 50.f, 0.1f, this, tr( "Stereo difference" ) ),
|
||||
m_levels( 256.f, 1.f, 256.f, 1.0f, this, tr( "Levels" ) ),
|
||||
m_levels( 256.f, 1.f, 256.f, 0.01f, this, tr( "Levels" ) ),
|
||||
m_rateEnabled( true, this, tr( "Rate enabled" ) ),
|
||||
m_depthEnabled( true, this, tr( "Depth enabled" ) )
|
||||
{
|
||||
|
||||
@@ -191,12 +191,12 @@ bool CrossoverEQEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
|
||||
double outSum = 0.0;
|
||||
for( int f = 0; f < frames; ++f )
|
||||
{
|
||||
outSum = buf[f][0] * buf[f][0] + buf[f][1] * buf[f][1];
|
||||
buf[f][0] = d * buf[f][0] + w * m_work[f][0];
|
||||
buf[f][1] = d * buf[f][1] + w * m_work[f][1];
|
||||
outSum += buf[f][0] * buf[f][0] + buf[f][1] * buf[f][1];
|
||||
}
|
||||
|
||||
checkGate( outSum );
|
||||
checkGate( outSum / frames );
|
||||
|
||||
return isRunning();
|
||||
}
|
||||
|
||||
@@ -193,11 +193,11 @@ bool DualFilterEffect::processAudioBuffer( sampleFrame* buf, const fpp_t frames
|
||||
s[0] += ( s2[0] * mix2 );
|
||||
s[1] += ( s2[1] * mix2 );
|
||||
}
|
||||
outSum += buf[f][0]*buf[f][0] + buf[f][1]*buf[f][1];
|
||||
|
||||
// do another mix with dry signal
|
||||
buf[f][0] = d * buf[f][0] + w * s[0];
|
||||
buf[f][1] = d * buf[f][1] + w * s[1];
|
||||
outSum += buf[f][0] * buf[f][0] + buf[f][1] * buf[f][1];
|
||||
|
||||
//increment pointers
|
||||
cut1Ptr += cut1Inc;
|
||||
|
||||
@@ -253,17 +253,16 @@ void audioFileProcessor::loadSettings( const QDomElement & _this )
|
||||
m_loopModel.loadSettings( _this, "looped" );
|
||||
m_ampModel.loadSettings( _this, "amp" );
|
||||
m_endPointModel.loadSettings( _this, "eframe" );
|
||||
m_startPointModel.loadSettings( _this, "sframe" );
|
||||
|
||||
// compat code for not having a separate loopback point
|
||||
if( _this.hasAttribute( "lframe" ) )
|
||||
if (_this.hasAttribute("lframe") || !(_this.firstChildElement("lframe").isNull()))
|
||||
{
|
||||
m_loopPointModel.loadSettings( _this, "lframe" );
|
||||
m_startPointModel.loadSettings( _this, "sframe" );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_loopPointModel.loadSettings( _this, "sframe" );
|
||||
m_startPointModel.setValue( m_loopPointModel.value() );
|
||||
}
|
||||
|
||||
m_reverseModel.loadSettings( _this, "reversed" );
|
||||
|
||||
@@ -215,10 +215,10 @@ bool dynProcEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
s[0] *= outputGain;
|
||||
s[1] *= outputGain;
|
||||
|
||||
out_sum += _buf[f][0]*_buf[f][0] + _buf[f][1]*_buf[f][1];
|
||||
// mix wet/dry signals
|
||||
_buf[f][0] = d * _buf[f][0] + w * s[0];
|
||||
_buf[f][1] = d * _buf[f][1] + w * s[1];
|
||||
out_sum += _buf[f][0] * _buf[f][0] + _buf[f][1] * _buf[f][1];
|
||||
}
|
||||
|
||||
checkGate( out_sum / _frames );
|
||||
|
||||
@@ -196,9 +196,15 @@ void vestigeInstrument::loadSettings( const QDomElement & _this )
|
||||
{
|
||||
m_plugin->loadSettings( _this );
|
||||
|
||||
if ( _this.attribute( "guivisible" ).toInt() ) {
|
||||
if (instrumentTrack() != NULL && instrumentTrack()->isPreviewMode())
|
||||
{
|
||||
m_plugin->hideUI();
|
||||
}
|
||||
else if (_this.attribute( "guivisible" ).toInt())
|
||||
{
|
||||
m_plugin->showUI();
|
||||
} else {
|
||||
} else
|
||||
{
|
||||
m_plugin->hideUI();
|
||||
}
|
||||
|
||||
@@ -320,12 +326,17 @@ void vestigeInstrument::loadFile( const QString & _file )
|
||||
{
|
||||
m_pluginMutex.lock();
|
||||
const bool set_ch_name = ( m_plugin != NULL &&
|
||||
instrumentTrack()->name() == m_plugin->name() ) ||
|
||||
instrumentTrack()->name() == InstrumentTrack::tr( "Default preset" ) ||
|
||||
instrumentTrack()->name() == displayName();
|
||||
instrumentTrack()->name() == m_plugin->name() ) ||
|
||||
instrumentTrack()->name() == InstrumentTrack::tr( "Default preset" ) ||
|
||||
instrumentTrack()->name() == displayName();
|
||||
|
||||
m_pluginMutex.unlock();
|
||||
|
||||
// if the same is loaded don't load again (for preview)
|
||||
if (instrumentTrack() != NULL && instrumentTrack()->isPreviewMode() &&
|
||||
m_pluginDLL == SampleBuffer::tryToMakeRelative( _file ))
|
||||
return;
|
||||
|
||||
if ( m_plugin != NULL )
|
||||
{
|
||||
closePlugin();
|
||||
@@ -352,8 +363,11 @@ void vestigeInstrument::loadFile( const QString & _file )
|
||||
return;
|
||||
}
|
||||
|
||||
m_plugin->createUI(nullptr);
|
||||
m_plugin->showUI();
|
||||
if ( !(instrumentTrack() != NULL && instrumentTrack()->isPreviewMode()))
|
||||
{
|
||||
m_plugin->createUI(nullptr);
|
||||
m_plugin->showUI();
|
||||
}
|
||||
|
||||
if( set_ch_name )
|
||||
{
|
||||
|
||||
@@ -140,10 +140,10 @@ bool waveShaperEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
s[0] *= *outputPtr;
|
||||
s[1] *= *outputPtr;
|
||||
|
||||
out_sum += _buf[f][0]*_buf[f][0] + _buf[f][1]*_buf[f][1];
|
||||
// mix wet/dry signals
|
||||
_buf[f][0] = d * _buf[f][0] + w * s[0];
|
||||
_buf[f][1] = d * _buf[f][1] + w * s[1];
|
||||
out_sum += _buf[f][0] * _buf[f][0] + _buf[f][1] * _buf[f][1];
|
||||
|
||||
outputPtr += outputInc;
|
||||
inputPtr += inputInc;
|
||||
|
||||
Reference in New Issue
Block a user