[chuck-users] 2 works 1.5 kills chuck

Rustom Mody rustompmody at gmail.com
Mon Jul 18 13:16:03 EDT 2011


Ive managed to tweak the example more or less to the requirement however (in
the code below)

On Sun, Jul 17, 2011 at 9:01 PM, Rustom Mody <rustompmody at gmail.com> wrote:

> fun void keyboardListener()
> {
>     KBHit hi;
>     int c;
>     while(true)
>     {
>         hi => now;
>         while(hi.more())
>         {
>             //if(msg.isButtonDown())
>             hi.getchar() => c;
>             {
>                 if(c == 68) // d
>                     2 *=> Voice.multiplier;
>                 else if(c == 72) // h
>                     2 /=> Voice.multiplier;
>                 else if(c == 73) // i
>                     Voice.decreaseSpread();
>                 else if(c == 79) // o
>                     Voice.increaseSpread();
>             }
>         }
>     }
> }
>



if I change
2 *=> Voice.multiplier;
to
1.5 *=> Voice.multiplier;

chuck dies and cpu usage shows 100%

Any clues/tips?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20110718/bb6a6911/attachment.htm>


More information about the chuck-users mailing list