Csound Csound-dev Csound-tekno Search About

bug in shaker

Date1999-10-26 18:10
FromDaniel Lopez
Subjectbug in shaker
Csound causes a divide by zero exception if you pass 0 to the kbeans argument of
the shaker opcode.

There is a line in the file shaker.c:
    p->wait_time = RAND_MAX / p->num_beans;
which is where the crash actually occurs.


Daniel



Here is an example .csd file:









instr 1
; 3rd argument - kbeans - crashes if 0
      a1  shaker	30000, 60, 0, 0.999, 0, 100
      out	a1
endin





i1	0	4