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

Diff of /linuxsampler/trunk/src/engines/common/PulseLFO.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 95  namespace LinuxSampler { Line 95  namespace LinuxSampler {
95              virtual void trigger(float Frequency, start_level_t StartLevel, uint16_t InternalDepth, uint16_t ExtControlDepth, bool FlipPhase, unsigned int SampleRate) {              virtual void trigger(float Frequency, start_level_t StartLevel, uint16_t InternalDepth, uint16_t ExtControlDepth, bool FlipPhase, unsigned int SampleRate) {
96                  trigger(Frequency, InternalDepth, ExtControlDepth, WIDTH / 10.0f, SampleRate);                  trigger(Frequency, InternalDepth, ExtControlDepth, WIDTH / 10.0f, SampleRate);
97              }              }
98                
99                /**
100                 * Should be invoked after the LFO is triggered.
101                 * @param phase From 0 to 360 degrees.
102                 */
103                void setPhase(float phase) {
104                    if (phase < 0) phase = 0;
105                    if (phase > 360) phase = 360;
106                    phase /= 360.0f;
107                    const unsigned int intLimit = (unsigned int) -1; // all 0xFFFF...
108                    uiLevel = intLimit * phase;
109                }
110    
111          protected:          protected:
112              unsigned int uiLevel;              unsigned int uiLevel;

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

  ViewVC Help
Powered by ViewVC