Skip to content

Commit

Permalink
fixed error in extract.c
Browse files Browse the repository at this point in the history
  • Loading branch information
jpffitch committed Dec 20, 2013
1 parent 5a5a125 commit 724e88b
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 19 deletions.
15 changes: 8 additions & 7 deletions Engine/csound_orc_compile.c
Expand Up @@ -1598,7 +1598,7 @@ PUBLIC int csoundCompileTree(CSOUND *csound, TREE *root)
/* run global i-time code */
init0(csound);
csound->ids = ids;

}
else {
/* first compilation */
Expand Down Expand Up @@ -1900,12 +1900,13 @@ static ARG* createArg(CSOUND *csound, INSTRTXT* ip,
arg->index = n;
}
/* trap local ksmps and kr */
else if ( (strcmp(s, "ksmps") == 0 && csoundFindVariableWithName(ip->varPool, s))
|| (strcmp(s, "kr") == 0 && csoundFindVariableWithName(ip->varPool, s))){
arg->type = ARG_LOCAL;
arg->argPtr = csoundFindVariableWithName(ip->varPool, s);
CS_VARIABLE *var = (CS_VARIABLE *)arg->argPtr;
}
else
if ((strcmp(s, "ksmps") == 0 && csoundFindVariableWithName(ip->varPool, s))
|| (strcmp(s, "kr") == 0 && csoundFindVariableWithName(ip->varPool, s))) {
arg->type = ARG_LOCAL;
arg->argPtr = csoundFindVariableWithName(ip->varPool, s);
CS_VARIABLE *var = (CS_VARIABLE *)arg->argPtr;
}
else if (c == 'g' || (c == '#' && *(s+1) == 'g') ||
csoundFindVariableWithName(csound->engineState.varPool, s) != NULL) {
// FIXME - figure out why string pool searched with gexist
Expand Down
3 changes: 2 additions & 1 deletion Engine/extract.c
Expand Up @@ -70,7 +70,8 @@ void readxfil(CSOUND *csound, EXTRACT_STATICS* extractStatics,
flag = 'i'; /* default -i flag supplied */
STA(onsect) = 1; STA(onbeat) = FL(0.0); /* other default vals */
STA(offsect) = 999; STA(offbeat) = FL(0.0);
while (fscanf(xfp, s) != EOF) {
// while (fscanf(xfp, s) != EOF) {
while (fgets(s, 82, xfp) != NULL) {
char *c = s;
int i;
switch (*c) {
Expand Down
8 changes: 4 additions & 4 deletions Engine/insert.c
Expand Up @@ -1398,7 +1398,7 @@ int xoutset(CSOUND *csound, XOUT *p)
tmp = buf->iobufp_ptrs;
if (*tmp || *(tmp + 1) || *(tmp + 2) || *(tmp + 3))
tmp += (inm->perf_incnt << 1);
tmp += 4;
tmp += 4;
if (*tmp || *(tmp + 1))
return OK;

Expand Down Expand Up @@ -2354,7 +2354,7 @@ void *init_pass_thread(void *p){
int done;
float wakeup = (1000*csound->ksmps/csound->esr);
while(csound->init_pass_loop) {

#if defined(MACOSX) || defined(LINUX) || defined(HAIKU)
usleep(1000*wakeup);
#else
Expand Down Expand Up @@ -2392,9 +2392,9 @@ void *init_pass_thread(void *p){
csoundUnlockMutex(csound->init_pass_threadlock);
}
ip = nxt;

}

}
return NULL;
}
2 changes: 1 addition & 1 deletion Engine/symbtab.c
Expand Up @@ -112,7 +112,7 @@ ORCTOKEN *add_token(CSOUND *csound, char *s, int type)
if (a!=NULL) {
if (type == a->type) return a;
if ((type!=T_FUNCTION || a->type!=T_OPCODE))
csound->Warning(csound,
csound->Warning(csound,
Str("Type confusion for %s (%d,%d), replacing\n"),
s, type, a->type);
a->type = type;
Expand Down
12 changes: 7 additions & 5 deletions Opcodes/sfont.c
Expand Up @@ -92,8 +92,8 @@ int sfont_ModuleDestroy(CSOUND *csound)
}
free(sfArray);
globals->currSFndx = 0;
csound->Free(csound, globals->presetp);
csound->Free(csound, globals->sampleBase);
csound->Free(csound, globals->presetp);
csound->Free(csound, globals->sampleBase);

csound->DestroyGlobalVariable(csound, "::sfontg");
return 0;
Expand Down Expand Up @@ -2601,12 +2601,14 @@ int sfont_ModuleCreate(CSOUND *csound)
Str("error... could not create sfont globals\n"));

globals->sfArray = (SFBANK *) malloc(MAX_SFONT*sizeof(SFBANK));
globals->presetp = (presetType **) csound->Malloc(csound, MAX_SFPRESET *sizeof(presetType *));
globals->sampleBase = (SHORT **) csound->Malloc(csound, MAX_SFPRESET*sizeof(SHORT *));
globals->presetp =
(presetType **) csound->Malloc(csound, MAX_SFPRESET *sizeof(presetType *));
globals->sampleBase =
(SHORT **) csound->Malloc(csound, MAX_SFPRESET*sizeof(SHORT *));
globals->currSFndx = 0;
globals->maxSFndx = MAX_SFONT;
for (j=0; j<128; j++) {
globals->pitches[j] = (MYFLT) (440.0 * pow (2.0,(j - 69.0)/12.0));
globals->pitches[j] = (MYFLT) (440.0 * pow(2.0, (double)(j- 69)/12.0));
}

return OK;
Expand Down
2 changes: 1 addition & 1 deletion mingw64-linux/README.md
Expand Up @@ -13,7 +13,7 @@ of Csound from Linux. These scripts were developed using Debian.
2. Create a directory called mingw64 in your home directory. This is where the
dependencies will be built and installed to::

mdkir ~/mingw64
mkdir ~/mingw64

3. Run the download-deps.sh script. This script will download source and
binary versions of dependencies that Csound will need. A folder called cache
Expand Down

0 comments on commit 724e88b

Please sign in to comment.