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 Christian Schoenebeck * |
* Copyright (C) 2005, 2007 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This library is free software; you can redistribute it and/or modify * |
* This library 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 * |
33 |
|
|
34 |
// calculate decay parameters (lin. curve) |
// calculate decay parameters (lin. curve) |
35 |
StepsLeft = (int) (DecayTime * SampleRate); |
StepsLeft = (int) (DecayTime * SampleRate); |
36 |
Coeff = (1.0f - Depth) / (float) StepsLeft; |
Coeff = (StepsLeft) ? (1.0f - Depth) / (float) StepsLeft : 0.0f; |
37 |
|
|
38 |
dmsg(4,("Depth=%d, DecayTime=%f\n", Depth, DecayTime)); |
dmsg(4,("Depth=%d, DecayTime=%f\n", Depth, DecayTime)); |
39 |
} |
} |