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

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

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

revision 3611 by senkov, Sun Jul 24 18:22:56 2005 UTC revision 3612 by schoenebeck, Mon Sep 30 18:03:43 2019 UTC
# Line 31  namespace LinuxSampler { Line 31  namespace LinuxSampler {
31       * This is a triangle Low Frequency Oscillator which uses pure integer       * This is a triangle Low Frequency Oscillator which uses pure integer
32       * math (without branches) to synthesize the triangular wave.       * math (without branches) to synthesize the triangular wave.
33       */       */
34      template<range_type_t RANGE>      template<LFO::range_type_t RANGE>
35      class LFOTriangleIntAbsMath : public LFOTriangleIntMath<RANGE> {      class LFOTriangleIntAbsMath : public LFOTriangleIntMath<RANGE> {
36          public:          public:
37              /**              /**
# Line 49  namespace LinuxSampler { Line 49  namespace LinuxSampler {
49               */               */
50              inline float render() {              inline float render() {
51                  this->iLevel += this->c;                  this->iLevel += this->c;
52                  if (RANGE == range_unsigned)                  if (RANGE == LFO::range_unsigned)
53                      return this->normalizer * (float) (abs(this->iLevel));                      return this->normalizer * (float) (abs(this->iLevel));
54                  else /* signed range */                  else /* signed range */
55                      return this->normalizer * (float) (abs(this->iLevel)) + this->offset;                      return this->normalizer * (float) (abs(this->iLevel)) + this->offset;

Legend:
Removed from v.3611  
changed lines
  Added in v.3612

  ViewVC Help
Powered by ViewVC