Bufnum from bufferAllocator?

Hi

When allocating a buffer using

s.sendMsg(\b_alloc, s.bufferAllocator, 44100 * 2)

How do I find what bufNum was used?

Thanks
D

I would advise against calling the allocator directly in the message.

You’ll need the bufnum later… and if you’re using the allocator directly, then it’s your responsibility to save the bufnum in your own variable or collection.

So step 1 would look like myBufnum = s.bufferAllocator.alloc(1);.

Then use the variable, and not the allocator, to build the message.

hjh

1 Like