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

« back to all changes in this revision

Viewing changes to Opcodes/grain4.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:
33
33
/*        envelop rise and decade curve                 */
34
34
/* Minor changes by John Fitch Dec 1995                 */
35
35
 
36
 
#include "csdl.h"
 
36
// #include "csdl.h"
 
37
#include "csoundCore.h"
 
38
#include "interlocks.h"
37
39
#include "grain4.h"
38
40
#include <math.h>
39
41
 
261
263
    MYFLT       *ar, *ftbl, *ftbl_env=NULL;
262
264
    int         n, nsmps = csound->ksmps;
263
265
    int         nvoice;
264
 
    int32       flen, tmplong1, tmplong2, tmplong3, tmpfpnt, flen_env=0;
 
266
    int32       tmplong1, tmplong2, tmplong3, tmpfpnt, flen_env=0;
265
267
    MYFLT       fract, v1, tmpfloat1;
266
268
    int32       att_len, dec_len, att_sus;
267
269
    MYFLT       envlop;
275
277
 /* Recover parameters from previous call.... */
276
278
   ftp = p->ftp;
277
279
   if (UNLIKELY(p->ftp==NULL)) goto err1;          /* RWD fix */
278
 
   flen = ftp->flen;
279
280
   ftbl = ftp->ftable;
280
281
 
281
282
   if (*p->ifnenv > 0) {
429
430
 
430
431
#define S(x)    sizeof(x)
431
432
 
432
 
static OENTRY localops[] = {
433
 
{ "granule", S(GRAINV4), 5, "a", "xiiiiiiiiikikiiivppppo",
434
 
             (SUBR)grainsetv4, NULL, (SUBR)graingenv4}
 
433
static OENTRY grain4_localops[] = {
 
434
  { "granule", S(GRAINV4), TR|5, "a", "xiiiiiiiiikikiiivppppo",
 
435
             (SUBR)grainsetv4, NULL, (SUBR)graingenv4},
435
436
};
436
437
 
437
 
LINKAGE
438
 
 
 
438
LINKAGE1(grain4_localops)