projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
abb76fd
)
reduce math weirdness (thanks to Steven Yi)
author
Robin Gareus
<robin@gareus.org>
Wed, 18 Nov 2015 13:29:13 +0000
(14:29 +0100)
committer
Robin Gareus
<robin@gareus.org>
Wed, 18 Nov 2015 13:29:13 +0000
(14:29 +0100)
libs/ardour/audioregion.cc
patch
|
blob
|
history
diff --git
a/libs/ardour/audioregion.cc
b/libs/ardour/audioregion.cc
index 8f5228ad6a7208e7c7a268db643b501f7469ad95..ddd152bf0e89413dbfc8f9010d9e218752dc99fd 100644
(file)
--- a/
libs/ardour/audioregion.cc
+++ b/
libs/ardour/audioregion.cc
@@
-109,11
+109,9
@@
generate_db_fade (boost::shared_ptr<Evoral::ControlList> dst, double len, int nu
//generate a fade-out curve by successively applying a gain drop
float fade_speed = dB_to_coefficient(dB_drop / (float) num_steps);
+ float coeff = GAIN_COEFF_UNITY;
for (int i = 1; i < (num_steps-1); i++) {
- float coeff = GAIN_COEFF_UNITY;
- for (int j = 0; j < i; j++) {
- coeff *= fade_speed;
- }
+ coeff *= fade_speed;
dst->fast_simple_add (len*(double)i/(double)num_steps, coeff);
}