moved constants out of loop

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1743 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-10-04 23:22:54 +00:00
parent f19aa7f1b6
commit bfb3a7f407
2 changed files with 28 additions and 7 deletions

View File

@@ -1,5 +1,28 @@
2008-10-04 Tobias Doerffel <tobydox/at/users/dot/sourceforge/dot/net>
* plugins/kicker/kicker.cpp:
moved constants out of loop
* include/types.h:
set global alignment via a #define
* src/gui/piano_roll.cpp:
fixed typo
* src/core/song.cpp:
lock mixer while adjusting lengths of notePlayHandles after tempo change
* src/gui/file_browser.cpp:
* src/core/note_play_handle.cpp:
* src/core/audio/audio_port.cpp:
coding style fixes
* include/mixer.h:
* src/core/mixer.cpp:
removed fine-granular locking of various playHandle-vectors, just use
one global big lock for everything now - prevents various
deadlocks (e.g. when previewing samples in file browser)
* src/gui/automation_editor.cpp:
in erase-mode do not remove values without clicking

View File

@@ -151,15 +151,13 @@ void kickerInstrument::playNote( notePlayHandle * _n,
if( _n->released() )
{
const float rfd = _n->releaseFramesDone();
const float drf = desiredReleaseFrames();
for( fpp_t f = 0; f < frames; ++f )
{
const float fac = 1.0f -
(float)( _n->releaseFramesDone()+f ) /
desiredReleaseFrames();
for( ch_cnt_t ch = 0; ch < DEFAULT_CHANNELS; ++ch )
{
_working_buffer[f][ch] *= fac;
}
const float fac = 1.0f - ( rfd+f ) / drf;
_working_buffer[f][0] *= fac;
_working_buffer[f][1] *= fac;
}
}