File: csound-5.13.0-compile-flag.patch

package info (click to toggle)
csound 1%3A6.18.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 63,220 kB
  • sloc: ansic: 192,643; cpp: 14,149; javascript: 9,654; objc: 9,181; python: 3,376; java: 3,337; sh: 1,840; yacc: 1,255; xml: 985; perl: 635; lisp: 411; tcl: 341; lex: 217; makefile: 128
file content (63 lines) | stat: -rw-r--r-- 2,163 bytes parent folder | download | duplicates (4)
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
55
56
57
58
59
60
61
62
63
--- Csound5.13.0/Top/csound.c.orig	2011-04-07 10:36:19.738489172 +0100
+++ Csound5.13.0/Top/csound.c	2011-04-07 10:41:09.834581223 +0100
@@ -1382,6 +1382,10 @@
     {
         int done;
         int returnValue;
+        /* WTB - Oct 15 2009: only perform if CS_STATE_COMP set. */
+        if (UNLIKELY((csound->engineState & CS_STATE_COMP) == 0)) {
+           return 1;
+        }
         /* setup jmp for return after an exit() */
         if ((returnValue = setjmp(csound->exitjmp))) {
 #ifndef MACOSX
@@ -1402,6 +1406,10 @@
     {
         int done = 0;
         int returnValue;
+        /* WTB - Oct 15 2009: only perform if CS_STATE_COMP set. */
+        if (UNLIKELY((csound->engineState & CS_STATE_COMP) == 0)) {
+           return 1;
+        }
         /* setup jmp for return after an exit() */
         if ((returnValue = setjmp(csound->exitjmp))) {
 #ifndef MACOSX
@@ -1447,6 +1455,10 @@
         int done;
         int returnValue;
         csound->performState = 0;
+        /* WTB - Oct 15 2009: only perform if CS_STATE_COMP set. */
+        if (UNLIKELY((csound->engineState & CS_STATE_COMP) == 0)) {
+           return 1;
+        }
         /* setup jmp for return after an exit() */
         if ((returnValue = setjmp(csound->exitjmp))) {
 #ifndef MACOSX
--- Csound5.13.0/Top/main.c.orig	2011-04-07 10:36:24.745611983 +0100
+++ Csound5.13.0/Top/main.c	2011-04-07 10:43:02.001313569 +0100
@@ -89,7 +89,9 @@
     dbfs_init(csound, DFLT_DBFS);
     csound->csRtClock = (RTCLOCK*) csound->Calloc(csound, sizeof(RTCLOCK));
     csoundInitTimerStruct(csound->csRtClock);
-    csound->engineState |= CS_STATE_COMP | CS_STATE_CLN;
+    /* WTB - Oct 15 2009: only set CS_STATE_CLN; CS_STATE_COMP set when retval=0. */
+    csound->engineState |= /*CS_STATE_COMP |*/ CS_STATE_CLN;
+
 
 #ifndef USE_DOUBLE
 #ifdef BETA
@@ -409,6 +411,13 @@
     if (O->Midioutname != NULL || O->FMidioutname != NULL)
       openMIDIout(csound);
 
-    return musmon(csound);
+    n = musmon(csound);
+
+    /* WTB - Oct 15 2009: CS_STATE_COMP set when retval=0. */
+    if (n == 0) {
+               csound->engineState |= CS_STATE_COMP;
+    }
+
+    return n;
 }