added additional check to avoid segfault
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@505 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -392,6 +392,10 @@ void audioFileProcessor::setAudioFile( const QString & _audio_file, bool _rename
|
||||
void audioFileProcessor::playNote( notePlayHandle * _n, bool )
|
||||
{
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
sampleFrame * buf = new sampleFrame[frames];
|
||||
|
||||
if( !_n->m_pluginData )
|
||||
|
||||
@@ -702,6 +702,10 @@ void bitInvader::playNote( notePlayHandle * _n, bool )
|
||||
}
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
sampleFrame * buf = new sampleFrame[frames];
|
||||
|
||||
bSynth * ps = static_cast<bSynth *>( _n->m_pluginData );
|
||||
|
||||
@@ -199,6 +199,10 @@ void kickerInstrument::playNote( notePlayHandle * _n, bool )
|
||||
:
|
||||
engine::getMixer()->framesPerAudioBuffer();*/
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
const float f1 = m_startFreqKnob->value() + tfp * fdiff / decfr;
|
||||
const float f2 = m_startFreqKnob->value() + (frames+tfp-1)*fdiff/decfr;
|
||||
|
||||
|
||||
@@ -739,6 +739,10 @@ void lb302Synth::playNote( notePlayHandle * _n, bool )
|
||||
}
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
sampleFrame *buf = new sampleFrame[frames];
|
||||
|
||||
process(buf, frames);
|
||||
|
||||
@@ -360,6 +360,10 @@ void organicInstrument::playNote( notePlayHandle * _n, bool )
|
||||
)->oscRight;
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
sampleFrame * buf = new sampleFrame[frames];
|
||||
|
||||
osc_l->update( buf, frames, 0 );
|
||||
|
||||
@@ -214,6 +214,10 @@ QString patmanSynth::nodeName( void ) const
|
||||
void patmanSynth::playNote( notePlayHandle * _n, bool )
|
||||
{
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
sampleFrame * buf = new sampleFrame[frames];
|
||||
|
||||
if( !_n->m_pluginData )
|
||||
|
||||
@@ -144,6 +144,10 @@ void pluckedStringSynth::playNote( notePlayHandle * _n, bool )
|
||||
}
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
sampleFrame * buf = new sampleFrame[frames];
|
||||
|
||||
pluckSynth * ps = static_cast<pluckSynth *>( _n->m_pluginData );
|
||||
|
||||
@@ -552,6 +552,10 @@ void polyb302Synth::playNote( notePlayHandle * _n, bool )
|
||||
}
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
sampleFrame * buf = new sampleFrame[frames];
|
||||
|
||||
hstate->process( buf, frames, _n->frequency() );
|
||||
|
||||
@@ -146,6 +146,10 @@ singerBot::~singerBot()
|
||||
void singerBot::playNote( notePlayHandle * _n, bool )
|
||||
{
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( !_n->m_pluginData )
|
||||
{
|
||||
|
||||
@@ -442,6 +442,10 @@ void mallets::playNote( notePlayHandle * _n, bool )
|
||||
}
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
malletsSynth * ps = static_cast<malletsSynth *>( _n->m_pluginData );
|
||||
sample_t add_scale = 0.0f;
|
||||
|
||||
@@ -687,6 +687,10 @@ void tripleOscillator::playNote( notePlayHandle * _n, bool )
|
||||
)->oscRight;
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
sampleFrame * buf = new sampleFrame[frames];
|
||||
|
||||
osc_l->update( buf, frames, 0 );
|
||||
|
||||
@@ -576,6 +576,10 @@ void vibed::playNote( notePlayHandle * _n, bool )
|
||||
}
|
||||
|
||||
const fpp_t frames = _n->framesLeftForCurrentPeriod();
|
||||
if( frames == 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
stringContainer * ps = static_cast<stringContainer *>(
|
||||
_n->m_pluginData );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user