3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* Copyright (C) 2005 - 2010 Christian Schoenebeck * |
* Copyright (C) 2005 - 2011 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
140 |
Segment = segment_exp; |
Segment = segment_exp; |
141 |
const float slope = -9.226 / StepsLeft; |
const float slope = -9.226 / StepsLeft; |
142 |
Coeff = exp(slope); |
Coeff = exp(slope); |
143 |
StepsLeft = int(log(SustainLevel / Level) / slope); |
StepsLeft = int(log(std::max(SustainLevel, float(CONFIG_EG_BOTTOM)) / Level) / slope); |
144 |
if (StepsLeft > 0) return; |
if (StepsLeft > 0) return; |
145 |
|
|
146 |
enterSustainStage(); |
enterSustainStage(); |