~ubuntu-branches/ubuntu/precise/csound/precise

« back to all changes in this revision

Viewing changes to OOps/ugens2.c

  • Committer: Package Import Robot
  • Author(s): Felipe Sateler
  • Date: 2012-04-19 09:26:46 UTC
  • mfrom: (3.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20120419092646-96xbj1n6atuqosk2
Tags: 1:5.17.6~dfsg-1
* New upstream release
 - Do not build the wiimote opcodes (we need wiiuse).
* Add new API function to symbols file
* Disable lua opcodes, they were broken. Requires OpenMP to be enabled.
* Backport fixes from upstream:
  - Link dssi4cs with dl. Backport
  - Fix building of CsoundAC

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
        b *= R;
88
88
        if (UNLIKELY(phase >= 1.0)) {
89
89
          phase -= 1.0;
90
 
          b = pow(R, 1+phase); 
 
90
          b = pow(R, 1+phase);
91
91
        }
92
92
        else if (UNLIKELY(phase < 0.0)) {
93
93
          phase += 1.0;
94
 
          b = pow(R, 1+phase); 
 
94
          b = pow(R, 1+phase);
95
95
        }
96
96
      }
97
97
    }
104
104
        b *= R;
105
105
        if (UNLIKELY(phase >= 1.0)) {
106
106
          phase -= 1.0;
107
 
          b =  pow(R, 1+phase); 
 
107
          b =  pow(R, 1+phase);
108
108
        }
109
109
        else if (UNLIKELY(phase < 0.0)) {
110
110
          phase += 1.0;
111
 
          b = pow(R, 1+phase); 
 
111
          b = pow(R, 1+phase);
112
112
        }
113
113
      }
114
114
    }
144
144
        incr = (double)(cps[n] * onedsr);
145
145
        rs[n] = (MYFLT)phase;
146
146
        phase += incr;
147
 
        if (UNLIKELY((MYFLT)phase >= 1.0)) /* VL convert to MYFLT 
148
 
                                              to avoid rounded output 
 
147
        if (UNLIKELY((MYFLT)phase >= 1.0)) /* VL convert to MYFLT
 
148
                                              to avoid rounded output
149
149
                                              exceeding 1.0 on float version */
150
150
          phase -= 1.0;
151
151
        else if (UNLIKELY((MYFLT)phase < 0.0))
159
159
        phase += incr;
160
160
        if (UNLIKELY((MYFLT)phase >= 1.0)){
161
161
          phase -= 1.0;
162
 
        }
 
162
        }
163
163
        else if (UNLIKELY((MYFLT)phase < 0.0))
164
164
          phase += 1.0;
165
165
      }
589
589
        indx  = length - 1;
590
590
        fract = FL(1.0);
591
591
      }
592
 
      else if (UNLIKELY(ndx < 0)) {
 
592
      else if (UNLIKELY(indx < 0L)) {
593
593
        indx  = 0L;
594
594
        fract = FL(0.0);
595
595
      }
667
667
        indx  = length - 1;
668
668
        fract = FL(1.0);
669
669
      }
670
 
      else if (UNLIKELY(ndx < 0)) {
 
670
      else if (UNLIKELY(indx < 0L)) {
671
671
        indx  = 0L;
672
672
        fract = FL(0.0);
673
673
      }
728
728
         * the offset.  */
729
729
        ndx = (pxndx[n] * xbmul) + offset;
730
730
        indx = (int32) ndx;
731
 
        if (UNLIKELY(ndx <= FL(0.0))) {
 
731
        if (UNLIKELY(indx <= 0L)) {
732
732
          rslt[n] = tab[0];
733
733
          continue;
734
734
        }
806
806
          indx  = length - 1;
807
807
          fract = FL(1.0);
808
808
        }
809
 
        else if (UNLIKELY(ndx < 0)) {
 
809
        else if (UNLIKELY(indx < 0L)) {
810
810
          indx  = 0L;
811
811
          fract = FL(0.0);
812
812
        }
1589
1589
 err1:
1590
1590
    return csound->PerfError(csound, Str("oscil3: not initialised"));
1591
1591
}
1592