summaryrefslogtreecommitdiff
path: root/audio/csound-dev/patches/patch-ac
blob: 55f264d9c2a24ece1918c47fe06e289beb12fe5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
$NetBSD: patch-ac,v 1.1 2003/12/13 20:26:03 ben Exp $

--- extract.c.orig	2003-02-25 19:24:01.000000000 -0800
+++ extract.c
@@ -5,7 +5,7 @@
 static char    inslst[INSMAX];                 /*   values set by readxfil     */
 static int     onsect, offsect;                /*      "       "       "       */
 static MYFLT   onbeat, offbeat;                /*      "       "       "       */
-static MYFLT   ontime, offtime;                /* set by readxfil, mod by w-stmnt */
+static MYFLT   ontime, cs_offtime;                /* set by readxfil, mod by w-stmnt */
 
 static SRTBLK *frstout, *prvout;        /* links for building new outlist */
 
@@ -63,7 +63,7 @@ void readxfil(FILE *xfp)        /* read 
                 for(ip = &inslst[0]; ip < &inslst[INSMAX]; *ip++ = 1);
         }
         ontime = a0.newp3 = a0.p3val = onbeat;
-        offtime = f0.newp2 = f0.p2val = offbeat;
+        cs_offtime = f0.newp2 = f0.p2val = offbeat;
 }
 
 void extract(void)      /* extract instr events within the time period */
@@ -108,7 +108,7 @@ void extract(void)      /* extract instr
         if (sectno == onsect && warped)
           ontime = a0.newp3 = realt(onbeat);
         if (sectno == offsect && warped)
-          offtime = f0.newp2 = realt(offbeat);
+          cs_offtime = f0.newp2 = realt(offbeat);
         include(bp);
         break;
       case 't':
@@ -117,7 +117,7 @@ void extract(void)      /* extract instr
       case 'f':
       casef: if (sectno == onsect && bp->newp2 < ontime)
         bp->newp2 = ontime;
-      else if (sectno == offsect && bp->newp2 > offtime)
+      else if (sectno == offsect && bp->newp2 > cs_offtime)
         break;
       if (sectno == onsect && !a0done) {
         if (onbeat > 0)
@@ -144,10 +144,10 @@ void extract(void)      /* extract instr
           }
         }
         if (sectno == offsect) {
-          if (bp->newp2 >= offtime)
+          if (bp->newp2 >= cs_offtime)
             break;
-          if (turnoff > offtime) {
-            bp->newp3 = offtime - bp->newp2;
+          if (turnoff > cs_offtime) {
+            bp->newp3 = cs_offtime - bp->newp2;
             bp->p3val = offbeat - bp->p2val;
           }
         }