/[svn]/linuxsampler/trunk/src/engines/common/SawLFO.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/engines/common/SawLFO.h

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

revision 2224 by iliev, Fri Jul 29 13:39:58 2011 UTC revision 2225 by iliev, Tue Aug 2 13:44:57 2011 UTC
# Line 97  namespace LinuxSampler { Line 97  namespace LinuxSampler {
97    
98                  uiLevel = 0;                  uiLevel = 0;
99              }              }
100                
101                /**
102                 * Should be invoked after the LFO is triggered.
103                 * @param phase From 0 to 360 degrees.
104                 */
105                void setPhase(float phase) {
106                    if (phase < 0) phase = 0;
107                    if (phase > 360) phase = 360;
108                    phase /= 360.0f;
109                    const unsigned int intLimit = (unsigned int) -1; // all 0xFFFF...
110                    uiLevel = intLimit * phase;
111                }
112    
113          protected:          protected:
114              unsigned int uiLevel;              unsigned int uiLevel;

Legend:
Removed from v.2224  
changed lines
  Added in v.2225

  ViewVC Help
Powered by ViewVC