summaryrefslogtreecommitdiff
path: root/src/sample_selection.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sample_selection.cc')
-rw-r--r--src/sample_selection.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sample_selection.cc b/src/sample_selection.cc
index 03453f3..f675044 100644
--- a/src/sample_selection.cc
+++ b/src/sample_selection.cc
@@ -126,7 +126,7 @@ const Sample* SampleSelection::get(level_t level, std::size_t pos)
auto random = rand.floatInRange(0.,1.);
auto close = (samples[current_index].power - level)/power_range;
auto diverse = 1./(1. + (float)(pos - last[current_index])/settings.samplerate);
- auto value = f_close*pow2(close) + f_diverse*pow2(diverse) + f_random*random;
+ auto value = f_close*pow2(close) + f_diverse*diverse + f_random*random;
if (value < value_opt)
{