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

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

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

revision 2226 by iliev, Tue Aug 2 13:44:57 2011 UTC revision 2227 by iliev, Wed Aug 3 17:11:40 2011 UTC
# Line 126  namespace LinuxSampler { Line 126  namespace LinuxSampler {
126                  if (uiPhase > intLimit / 2) iLevel = uiPhase - intLimit;                  if (uiPhase > intLimit / 2) iLevel = uiPhase - intLimit;
127                  else iLevel = uiPhase;                  else iLevel = uiPhase;
128              }              }
129                
130                void setFrequency(float Frequency, unsigned int SampleRate) {
131                    const unsigned int intLimit = (unsigned int) -1; // all 0xFFFF...
132                    float r = Frequency / (float) SampleRate; // frequency alteration quotient
133                    c = (int) (intLimit * r);
134                }
135    
136          protected:          protected:
137              int   iLevel;              int   iLevel;

Legend:
Removed from v.2226  
changed lines
  Added in v.2227

  ViewVC Help
Powered by ViewVC