/[svn]/linuxsampler/trunk/src/engines/sfz/EGADSR.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/sfz/EGADSR.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2174 by persson, Sat Jan 30 10:30:02 2010 UTC revision 2175 by persson, Mon Apr 25 08:12:36 2011 UTC
# Line 3  Line 3 
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  *
# Line 140  namespace LinuxSampler { namespace sfz { Line 140  namespace LinuxSampler { namespace sfz {
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();

Legend:
Removed from v.2174  
changed lines
  Added in v.2175

  ViewVC Help
Powered by ViewVC