[chuck-users] sndbuf cleanups?
Kassen
signal.automatique at gmail.com
Mon Jun 18 06:13:53 EDT 2007
James Hughes <jamezilla at gmail.com> wrote:
> I've got a chuck app that runs great for about thirty minutes and then
> starts acting flaky.
<snip>
Here's the relevant bit of code that takes the
> OSC message and loads up the clip:
>
> oe.getInt() => int player;
> oe.getString() => string snd;
>
> // allocate a new sound buffer
> new SndBuf @=> newClip[player];
>
> // stick the new sound in the new sound buffer
> snd => newClip[player].read;
>
> Anyone have any idea what's going on? Should I be destroying these
> SndBufs more explicitly rather than just dropping their references?
Well, why are you allocating a new one at all? It seems to me that you
are now working like a DJ who is ordering in a new turntable every
time he puts on a new record. Why not comment that "new SndBuf...."
line out alltogether and just use the old player with a new file?
I realise every guess at what might be causing this will cost you 30
minutes of testing but I think commenting that line out might be the
fix. Alternately you disconect (unchuck) the old SndBuf from the dac
but I think this is it.
Yours,
Kas.
More information about the chuck-users
mailing list