[chuck-users] Urgent shot in the dark -- Audible clicks when spawning shreds when SndBuf reads from disk

Spencer Salazar ssalazar at CS.Princeton.EDU
Mon Nov 9 21:42:32 EST 2009


Howdy,

On Nov 8, 2009, at 1:38 PM, Kassen wrote:

> Kas, I was using buf.chunks(1024), but it looked in Activity Monitor
> like it was loading the whole file anyway.  hrm...
>
>
> Lovely! Another bug found. We need to keep Ge on his toes; I hear he  
> eats quite a lot, let's keep him busy to compensate ;-). I have  
> actually been working on a similar problem lately ( http://bottomfeeder.ca/top/?p=71 
>  ). It's quite hard. I said it before but I feel that ChucK could  
> use a syntax for "load this file as quickly as you can without  
> glitches but no quicker". The matter has been debated on the wiki  
> with regard to fileIO but I still feel that the interaction between  
> the highly abstracted ChucK syntax (that assumes a infinitely fast  
> computer even while meant to facilitate a good trade between sound  
> quality and CPU usage) and the finite resources of the underlying  
> system could use some attention.

Quick question: how is Activity Monitor being used to make this  
conclusion?  If you are looking purely at total memory usage, one  
thing to consider is that SndBuf allocates memory to store the entire  
file in memory as soon as it is opened, regardless of your chunk  
size.  Not that, like, ChucK has never had a bug or anything... just  
want to make sure we're not chasing shadows.

spencer




More information about the chuck-users mailing list