/[svn]/linuxsampler/trunk/src/engines/gig/EGDecay.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/gig/EGDecay.cpp

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

revision 1148 by schoenebeck, Tue Aug 16 17:14:25 2005 UTC revision 1149 by schoenebeck, Sat Apr 7 22:32:47 2007 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 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  *
# Line 33  namespace LinuxSampler { namespace gig { Line 33  namespace LinuxSampler { namespace gig {
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      }      }

Legend:
Removed from v.1148  
changed lines
  Added in v.1149

  ViewVC Help
Powered by ViewVC