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

Kassen signal.automatique at gmail.com
Sun Nov 8 10:19:53 EST 2009


do you hear the click in the resulting tmp.wav? If not, then the problem is
> with reading a file between samples. If yes, then the abrupt sample change
> may play a role, too.
I should clarify that ChucK doesn't need to calculate one sample per samp.
If that were the case then I think any non-trivial file-loading would cause
issues, which is of course untrue.

ChucK doesn't hand values to the soundcard one by one, instead it does so in
blocks of tens, hundreds or thousands of samples (always a power of 2). The
thing that needs to be done is calculate -say- 512 samples in a duration of
512::samp so assuming there is no heavy processing going on we can deal with
any peaks in cpu usage by increasing the block size by enough.

Timing-wise the loading still occurs "in between samples" but then again; so
does all our other code.

I hope that clarifies things a bit. Shout if I misunderstood you.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20091108/52278dad/attachment.htm>

More information about the chuck-users mailing list