diff --git a/ChangeLog b/ChangeLog index 20ce2b7a2..3f09c1959 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-01-05 Tobias Doerffel + + * plugins/organic/organic.cpp: + * plugins/bit_invader/bit_invader.cpp: + * plugins/vibed/vibed.cpp: + * plugins/triple_oscillator/triple_oscillator.cpp: + * plugins/stk/mallets/mallets.cpp: + make sure, pluginData-pointer is always initialized in playNote() + + * src/core/envelope_and_lfo_widget.cpp: + simple range-checking + 2008-01-04 Tobias Doerffel * plugins/ladspa_effect/ladspa_effect.cpp: diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index f6112d172..dd817073c 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -535,7 +535,7 @@ void bitInvader::smoothClicked( void ) void bitInvader::playNote( notePlayHandle * _n, bool ) { - if ( _n->totalFramesPlayed() == 0 ) + if ( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL ) { float factor; diff --git a/plugins/organic/organic.cpp b/plugins/organic/organic.cpp index 3241a12ef..f6d54c677 100644 --- a/plugins/organic/organic.cpp +++ b/plugins/organic/organic.cpp @@ -261,7 +261,7 @@ QString organicInstrument::nodeName( void ) const void organicInstrument::playNote( notePlayHandle * _n, bool ) { - if( _n->totalFramesPlayed() == 0 ) + if( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL ) { oscillator * oscs_l[m_num_oscillators]; oscillator * oscs_r[m_num_oscillators]; diff --git a/plugins/stk/mallets/mallets.cpp b/plugins/stk/mallets/mallets.cpp index 4d1fb4419..662fdd956 100644 --- a/plugins/stk/mallets/mallets.cpp +++ b/plugins/stk/mallets/mallets.cpp @@ -219,7 +219,7 @@ void malletsInstrument::playNote( notePlayHandle * _n, bool ) int p = m_presetsModel.value(); const float freq = _n->frequency(); - if ( _n->totalFramesPlayed() == 0 ) + if ( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL ) { float vel = static_cast( _n->getVolume() ) / 100.0f; diff --git a/plugins/triple_oscillator/triple_oscillator.cpp b/plugins/triple_oscillator/triple_oscillator.cpp index 700587383..1faef3e27 100644 --- a/plugins/triple_oscillator/triple_oscillator.cpp +++ b/plugins/triple_oscillator/triple_oscillator.cpp @@ -577,7 +577,7 @@ QString tripleOscillator::nodeName( void ) const void tripleOscillator::playNote( notePlayHandle * _n, bool ) { - if( _n->totalFramesPlayed() == 0 ) + if( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL ) { oscillator * oscs_l[NUM_OF_OSCILLATORS]; oscillator * oscs_r[NUM_OF_OSCILLATORS]; diff --git a/plugins/vibed/vibed.cpp b/plugins/vibed/vibed.cpp index 3f1d5526c..6ff6e204a 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -468,7 +468,7 @@ QString vibed::nodeName( void ) const void vibed::playNote( notePlayHandle * _n, bool ) { - if ( _n->totalFramesPlayed() == 0 ) + if ( _n->totalFramesPlayed() == 0 || _n->m_pluginData == NULL ) { _n->m_pluginData = new stringContainer( _n->frequency(), engine::getMixer()->sampleRate(), diff --git a/src/core/envelope_and_lfo_widget.cpp b/src/core/envelope_and_lfo_widget.cpp index c088aa3d6..202b9c9bc 100644 --- a/src/core/envelope_and_lfo_widget.cpp +++ b/src/core/envelope_and_lfo_widget.cpp @@ -577,6 +577,11 @@ void FASTCALL envelopeAndLFOWidget::fillLevel( float * _buf, f_cnt_t _frame, const f_cnt_t _release_begin, const fpp_t _frames ) { + if( _frame < 0 || _release_begin < 0 ) + { + return; + } + fillLFOLevel( _buf, _frame, _frames ); for( fpp_t offset = 0; offset < _frames; ++offset, ++_buf, ++_frame )