--- linuxsampler/trunk/src/engines/common/SawLFO.h 2011/07/29 13:39:58 2223 +++ linuxsampler/trunk/src/engines/common/SawLFO.h 2011/08/02 13:44:57 2225 @@ -97,6 +97,18 @@ uiLevel = 0; } + + /** + * Should be invoked after the LFO is triggered. + * @param phase From 0 to 360 degrees. + */ + void setPhase(float phase) { + if (phase < 0) phase = 0; + if (phase > 360) phase = 360; + phase /= 360.0f; + const unsigned int intLimit = (unsigned int) -1; // all 0xFFFF... + uiLevel = intLimit * phase; + } protected: unsigned int uiLevel;