From 8cdcbfcc05833c6afa58e7d296a4e0e86661befc Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 6 Aug 2007 13:29:54 +0000 Subject: [PATCH] use new applyRelease()-method git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@520 0778d3d1-df1d-0410-868b-ea421aaaa00d --- ChangeLog | 24 +++++++++++++++++++ .../triple_oscillator/triple_oscillator.cpp | 2 ++ plugins/triple_oscillator/triple_oscillator.h | 5 ++++ 3 files changed, 31 insertions(+) diff --git a/ChangeLog b/ChangeLog index b3f7e39c8..cde0fae1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,29 @@ 2007-08-06 Tobias Doerffel + * plugins/triple_oscillator/triple_oscillator.h: + * plugins/triple_oscillator/triple_oscillator.cpp: + use new applyRelease()-method + + * include/instrument.h: + * src/core/instrument.cpp: + added method instrument::applyRelease( ... ) which applies a release + on given buffer according to the value returned by + desiredReleaseFrames() - instruments can use this easily by simply + calling this method before calling + getInstrumentTrack()->processAudioBuffer() + + * src/core/preset_preview_play_handle.cpp: + * src/tracks/instrument_track.cpp: + use only half of valueRange::max because otherwise we have + overflows at several places + + * src/core/note_play_handle.cpp: + fixed framesLeft()-method to return correct values if plugin has + desiredReleaseFrames() > 0 + + * include/note_play_handle.h: + cleanups + * configure.in: bumped to 0.3.0-rc2 diff --git a/plugins/triple_oscillator/triple_oscillator.cpp b/plugins/triple_oscillator/triple_oscillator.cpp index 8e3dfc316..a6afba3a6 100644 --- a/plugins/triple_oscillator/triple_oscillator.cpp +++ b/plugins/triple_oscillator/triple_oscillator.cpp @@ -692,6 +692,8 @@ void tripleOscillator::playNote( notePlayHandle * _n, bool ) osc_l->update( buf, frames, 0 ); osc_r->update( buf, frames, 1 ); + applyRelease( buf, _n ); + getInstrumentTrack()->processAudioBuffer( buf, frames, _n ); delete[] buf; diff --git a/plugins/triple_oscillator/triple_oscillator.h b/plugins/triple_oscillator/triple_oscillator.h index 547ee190c..56650386d 100644 --- a/plugins/triple_oscillator/triple_oscillator.h +++ b/plugins/triple_oscillator/triple_oscillator.h @@ -111,6 +111,11 @@ public: virtual QString nodeName( void ) const; + virtual f_cnt_t desiredReleaseFrames( void ) const + { + return( 128 ); + } + protected slots: void updateAllDetuning( void );