From 3fefa8db5270501fb26b15d7e5b220f7fba4b290 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Sat, 5 Jan 2008 16:07:56 +0000 Subject: [PATCH] miscellanous fixes git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/branches/lmms/stable-0.3@647 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 15 +++++++++++++++ README | 2 +- configure.in | 4 ++-- plugins/bit_invader/bit_invader.cpp | 2 +- plugins/organic/organic.cpp | 2 +- plugins/stk/mallets/mallets.cpp | 2 +- plugins/triple_oscillator/triple_oscillator.cpp | 2 +- plugins/vibed/vibed.cpp | 2 +- src/core/envelope_and_lfo_widget.cpp | 5 +++++ 9 files changed, 28 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02e2c0a68..bae186b56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +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 + + * README: + fixed version + 2008-01-02 Tobias Doerffel * include/dummy_effect.h: diff --git a/README b/README index 1adf4ec3f..2171a2b5c 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -Linux MultiMedia Studio 0.3.0 +Linux MultiMedia Studio 0.3.1 ============================== Copyright (c) 2004-2008 by LMMS-developers diff --git a/configure.in b/configure.in index c3a016c84..3b95bac09 100644 --- a/configure.in +++ b/configure.in @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) -AC_INIT(lmms, 0.3.1, lmms-devel/at/lists/dot/sf/dot/net) -AM_INIT_AUTOMAKE(lmms, 0.3.1) +AC_INIT(lmms, 0.3.1-svn20080105, lmms-devel/at/lists/dot/sf/dot/net) +AM_INIT_AUTOMAKE(lmms, 0.3.1-svn20080105) AM_CONFIG_HEADER(config.h) diff --git a/plugins/bit_invader/bit_invader.cpp b/plugins/bit_invader/bit_invader.cpp index c925e729d..67f8ae130 100644 --- a/plugins/bit_invader/bit_invader.cpp +++ b/plugins/bit_invader/bit_invader.cpp @@ -683,7 +683,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 245162221..3d80b6908 100644 --- a/plugins/organic/organic.cpp +++ b/plugins/organic/organic.cpp @@ -288,7 +288,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 4e40bd58e..8326fa4af 100644 --- a/plugins/stk/mallets/mallets.cpp +++ b/plugins/stk/mallets/mallets.cpp @@ -416,7 +416,7 @@ void mallets::playNote( notePlayHandle * _n, bool ) int p = m_presets->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 a6afba3a6..5219a0d97 100644 --- a/plugins/triple_oscillator/triple_oscillator.cpp +++ b/plugins/triple_oscillator/triple_oscillator.cpp @@ -625,7 +625,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 635ac0f98..b4d3f1256 100644 --- a/plugins/vibed/vibed.cpp +++ b/plugins/vibed/vibed.cpp @@ -549,7 +549,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 6525c3af4..ae1a835b0 100644 --- a/src/core/envelope_and_lfo_widget.cpp +++ b/src/core/envelope_and_lfo_widget.cpp @@ -615,6 +615,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 )